diff --git a/flake.nix b/flake.nix index fa63ac3..e5397e2 100644 --- a/flake.nix +++ b/flake.nix @@ -20,21 +20,8 @@ in { nixosConfigurations = { "${hostname}" = inputs.nixpkgs.lib.nixosSystem { - specialArgs = { inherit hostname inputs username; }; - modules = [ - ./hosts - inputs.home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.${username} = { - imports = [ - ./home - inputs.nixvim.homeModules.nixvim - ]; - }; - } - ]; + modules = [./hosts]; + specialArgs = {inherit hostname inputs username;}; }; }; }; diff --git a/home/default.nix b/home/default.nix index 43ab129..c1b8ca0 100644 --- a/home/default.nix +++ b/home/default.nix @@ -11,8 +11,7 @@ in { ls ./cli ++ ls ./gui ++ ls ./tui - ++ ls ./wayland - ++ [ ./nixvim ]; + ++ ls ./wayland; home = { file = { diff --git a/home/nixvim/autocmd.nix b/home/nixvim/autocmd.nix deleted file mode 100644 index c70bde7..0000000 --- a/home/nixvim/autocmd.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ - autoGroups = { - highlight_yank = {}; - vim_enter = {}; - indentscope = {}; - restore_cursor = {}; - }; - - autoCmd = [ - # highlight Text on Yank - { - group = "highlight_yank"; - event = "TextYankPost"; - pattern = "*"; - callback = { - __raw = " - function() - vim.highlight.on_yank() - end - "; - }; - } - { - group = "indentscope"; - event = ["FileType"]; - pattern = [ - "help" - "Startup" - "startup" - "neo-tree" - "Trouble" - "trouble" - "notify" - ]; - callback = { - __raw = '' - function() - vim.b.miniindentscope_disable = true - end - ''; - }; - } - ## from NVChad https://nvchad.com/docs/recipes (this autocmd will restore the cursor position when opening a file) - { - group = "restore_cursor"; - event = ["BufReadPost"]; - pattern = "*"; - callback = { - __raw = '' - function() - if - vim.fn.line "'\"" > 1 - and vim.fn.line "'\"" <= vim.fn.line "$" - and vim.bo.filetype ~= "commit" - and vim.fn.index({ "xxd", "gitrebase" }, vim.bo.filetype) == -1 - then - vim.cmd "normal! g`\"" - end - end - ''; - }; - } - ]; -} diff --git a/home/nixvim/default.nix b/home/nixvim/default.nix deleted file mode 100644 index b3dafc8..0000000 --- a/home/nixvim/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{pkgs, ...}: { - programs.nixvim = { - enable = true; - enableMan = false; - imports = [ - ./autocmd.nix - ./keymaps.nix - ./settings.nix - ./lazy.nix - ./plugins - ]; - extraPackages = with pkgs; [ - wakatime-cli - ]; - }; -} diff --git a/home/nixvim/keymaps.nix b/home/nixvim/keymaps.nix deleted file mode 100644 index 7ac5e5f..0000000 --- a/home/nixvim/keymaps.nix +++ /dev/null @@ -1,273 +0,0 @@ -{ - globals.mapleader = " "; - - keymaps = [ - # Windows - { - mode = "n"; - key = ""; - action = "k"; - options.desc = "Move To Window Up"; - } - - { - mode = "n"; - key = ""; - action = "j"; - options.desc = "Move To Window Down"; - } - - { - mode = "n"; - key = ""; - action = "h"; - options.desc = "Move To Window Left"; - } - - { - mode = "n"; - key = ""; - action = "l"; - options.desc = "Move To Window Right"; - } - - { - mode = "n"; - key = "wd"; - action = "c"; - options = { - silent = true; - desc = "Delete window"; - }; - } - - { - mode = "n"; - key = "-"; - action = "s"; - options = { - silent = true; - desc = "Split window below"; - }; - } - - { - mode = "n"; - key = "|"; - action = "v"; - options = { - silent = true; - desc = "Split window right"; - }; - } - - { - mode = "n"; - key = ""; - action = "w"; - options = { - silent = true; - desc = "Save file"; - }; - } - - # Quit/Session - { - mode = "n"; - key = "qq"; - action = "quitall"; - options = { - silent = true; - desc = "Quit all"; - }; - } - - # Toggle options - { - mode = "n"; - key = "ul"; - action = ":lua ToggleLineNumber()"; - options = { - silent = true; - desc = "Toggle Line Numbers"; - }; - } - - { - mode = "n"; - key = "uL"; - action = ":lua ToggleRelativeLineNumber()"; - options = { - silent = true; - desc = "Toggle Relative Line Numbers"; - }; - } - - { - mode = "n"; - key = "uw"; - action = ":lua ToggleWrap()"; - options = { - silent = true; - desc = "Toggle Line Wrap"; - }; - } - - # Move Lines - { - mode = "n"; - key = ""; - action = "m .-2=="; - options.desc = "Move line up"; - } - - { - mode = "v"; - key = ""; - action = ":m '<-2gv=gv"; - options.desc = "Move line up"; - } - - { - mode = "n"; - key = ""; - action = "m .+1=="; - options.desc = "Move line down"; - } - - { - mode = "v"; - key = ""; - action = ":m '>+1gv=gv"; - options.desc = "Move line Down"; - } - - # Better indenting - { - mode = "v"; - key = "<"; - action = " + y or just y to have it just in vim - { - mode = [ - "n" - "v" - ]; - key = "y"; - action = "\"+y"; - options.desc = "Copy to system clipboard"; - } - - # Delete to void register - { - mode = [ - "n" - "v" - ]; - key = "D"; - action = "\"_d"; - options.desc = "Delete to void register"; - } - ]; - extraConfigLua = '' - function ToggleLineNumber() - if vim.wo.number then - vim.wo.number = false - else - vim.wo.number = true - vim.wo.relativenumber = false - end - end - - function ToggleRelativeLineNumber() - if vim.wo.relativenumber then - vim.wo.relativenumber = false - else - vim.wo.relativenumber = true - vim.wo.number = false - end - end - - function ToggleWrap() - vim.wo.wrap = not vim.wo.wrap - end - - if vim.lsp.inlay_hint then - vim.keymap.set('n', 'uh', function() - vim.lsp.inlay_hint(0, nil) - end, { desc = 'Toggle Inlay Hints' }) - end - ''; -} diff --git a/home/nixvim/lazy.nix b/home/nixvim/lazy.nix deleted file mode 100644 index 7bb02aa..0000000 --- a/home/nixvim/lazy.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.lazy = { - enable = true; - }; -} diff --git a/home/nixvim/plugins/ai/codeium.nix b/home/nixvim/plugins/ai/codeium.nix deleted file mode 100644 index 68f446c..0000000 --- a/home/nixvim/plugins/ai/codeium.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - lib, - pkgs, - ... -}: { - plugins = { - codeium-nvim = { - enable = true; - - settings = { - enable_chat = true; - - tools = { - curl = lib.getExe pkgs.curl; - gzip = lib.getExe pkgs.gzip; - uname = lib.getExe' pkgs.coreutils "uname"; - uuidgen = lib.getExe' pkgs.util-linux "uuidgen"; - }; - }; - }; - }; - - keymaps = [ - { - mode = "n"; - key = "ac"; - action = "Codeium Chat"; - options = { - desc = "Codeium Chat"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/ai/copilot.nix b/home/nixvim/plugins/ai/copilot.nix deleted file mode 100644 index 13e75d9..0000000 --- a/home/nixvim/plugins/ai/copilot.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - plugins = { - copilot-chat.enable = true; - copilot-lua = { - enable = true; - suggestion = { - enabled = false; - autoTrigger = true; - keymap.accept = ""; - }; - panel.enabled = false; - }; - - which-key.settings.spec = [ - { - __unkeyed-1 = "a"; - mode = "n"; - icon = "󰚩"; - group = "+ai"; - } - ]; - }; - - keymaps = [ - { - action = "CopilotChatToggle"; - key = "ac"; - options.desc = "Toggle Coilot chat"; - mode = "n"; - } - ]; -} diff --git a/home/nixvim/plugins/completion/cmp.nix b/home/nixvim/plugins/completion/cmp.nix deleted file mode 100644 index c3b2c0d..0000000 --- a/home/nixvim/plugins/completion/cmp.nix +++ /dev/null @@ -1,166 +0,0 @@ -{lib, ...}: { - plugins = { - cmp = { - enable = true; - autoEnableSources = true; - - cmdline = { - "/" = { - mapping.__raw = "cmp.mapping.preset.cmdline()"; - sources = [{name = "buffer";}]; - }; - ":" = { - mapping.__raw = "cmp.mapping.preset.cmdline()"; - sources = [ - {name = "path";} - { - name = "cmdline"; - option.ignore_cmds = [ - "Man" - "!" - ]; - } - ]; - }; - }; - - filetype = { - sql.sources = [ - {name = "buffer";} - {name = "vim-dadbod-completion";} - ]; - }; - - settings = { - # Preselect first entry - completion.completeopt = "menu,menuone,noinsert"; - sources = [ - { - name = "nvim_lsp"; - priority = 100; - } - { - name = "nvim_lsp_signature_help"; - priority = 100; - } - { - name = "nvim_lsp_document_symbol"; - priority = 100; - } - { - name = "treesitter"; - priority = 80; - } - { - name = "luasnip"; - priority = 70; - } - # { - # name = "codeium"; - # priority = 60; - # } - { - name = "buffer"; - priority = 50; - # Words from other open buffers can also be suggested. - option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; - keywordLength = 3; - } - { - name = "path"; - priority = 30; - } - { - name = "git"; - priority = 20; - } - { - name = "npm"; - priority = 20; - } - # { - # name = "zsh"; - # priority = 20; - # } - { - name = "calc"; - priority = 10; - } - { - name = "emoji"; - priority = 5; - } - - # Disable this if running tests with nix flake check - (lib.mkIf lib.nixvim.enableExceptInTests {name = "nixpkgs_maintainers";}) - ]; - - window = { - completion.border = "rounded"; - documentation.border = "rounded"; - }; - experimental.ghost_text = true; - - mapping = { - "".__raw = '' - cmp.mapping(function(fallback) - local luasnip = require("luasnip") - if luasnip.locally_jumpable(1) then - luasnip.jump(1) - else - fallback() - end - end, { "i", "s" }) - ''; - - "".__raw = '' - cmp.mapping(function(fallback) - local luasnip = require("luasnip") - if luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }) - ''; - - "" = - # lua - "cmp.mapping(cmp.mapping.select_next_item())"; - "" = - # lua - "cmp.mapping(cmp.mapping.select_prev_item())"; - "" = - # lua - "cmp.mapping.abort()"; - "" = - # lua - "cmp.mapping.scroll_docs(-4)"; - "" = - # lua - "cmp.mapping.scroll_docs(4)"; - "" = - # lua - "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; - "" = - # lua - "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; - "" = - # lua - "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })"; - "" = - # lua - "cmp.mapping.complete()"; - }; - - snippet.expand = - # lua - '' - function(args) - require('luasnip').lsp_expand(args.body) - end - ''; - }; - }; - }; -} diff --git a/home/nixvim/plugins/completion/lspkind.nix b/home/nixvim/plugins/completion/lspkind.nix deleted file mode 100644 index f62c12b..0000000 --- a/home/nixvim/plugins/completion/lspkind.nix +++ /dev/null @@ -1,67 +0,0 @@ -{ - plugins.lspkind = { - enable = true; - - settings = { - cmp.menu = { - nvim_lsp = ""; - nvim_lua = ""; - neorg = "[neorg]"; - buffer = ""; - calc = ""; - git = ""; - luasnip = "󰩫"; - codeium = "󱜙"; - copilot = ""; - emoji = "󰞅"; - path = ""; - spell = ""; - }; - - symbol_map = { - Namespace = "󰌗"; - Text = "󰊄"; - Method = "󰆧"; - Function = "󰡱"; - Constructor = ""; - Field = "󰜢"; - Variable = "󰀫"; - Class = "󰠱"; - Interface = ""; - Module = "󰕳"; - Property = ""; - Unit = "󰑭"; - Value = "󰎠"; - Enum = ""; - Keyword = "󰌋"; - Snippet = ""; - Color = "󰏘"; - File = "󰈚"; - Reference = "󰈇"; - Folder = "󰉋"; - EnumMember = ""; - Constant = "󰏿"; - Struct = "󰙅"; - Event = ""; - Operator = "󰆕"; - TypeParameter = ""; - Table = ""; - Object = "󰅩"; - Tag = ""; - Array = "[]"; - Boolean = ""; - Number = ""; - Null = "󰟢"; - String = "󰉿"; - Calendar = ""; - Watch = "󰥔"; - Package = ""; - Copilot = ""; - Codeium = ""; - TabNine = ""; - }; - maxwidth = 50; - ellipsis_char = "..."; - }; - }; -} diff --git a/home/nixvim/plugins/debug/dap.nix b/home/nixvim/plugins/debug/dap.nix deleted file mode 100644 index 31c27b9..0000000 --- a/home/nixvim/plugins/debug/dap.nix +++ /dev/null @@ -1,198 +0,0 @@ -{ - plugins = { - dap = { - enable = true; - signs = { - dapBreakpoint = { - text = " "; - texthl = "DiagnosticInfo"; - }; - dapBreakpointCondition = { - text = " "; - texthl = "DiagnosticInfo"; - }; - dapBreakpointRejected = { - text = " "; - texthl = "DiagnosticError"; - }; - dapLogPoint = { - text = " "; - texthl = "DiagnosticInfo"; - }; - dapStopped = { - text = "󰁕 "; - texthl = "DiagnosticWarn"; - linehl = "DapStoppedLine"; - numhl = "DapStoppedLine"; - }; - }; - }; - dap-ui = { - enable = true; - settings.layouts = [ - { - elements = [ - { - id = "scopes"; - size = 0.25; - } - { - id = "breakpoints"; - size = 0.25; - } - { - id = "stacks"; - size = 0.25; - } - { - id = "watches"; - size = 0.25; - } - ]; - position = "left"; - size = 40; - } - { - elements = [ - { - id = "repl"; - size = 0.5; - } - { - id = "console"; - size = 0; - } - ]; - position = "bottom"; - size = 10; - } - ]; - }; - dap-virtual-text.enable = true; - which-key.settings.spec = [ - { - __unkeyed-1 = "d"; - mode = [ - "n" - "v" - ]; - group = "+debug"; - } - ]; - }; - - keymaps = [ - { - mode = ["n"]; - action = ":DapContinue"; - key = "dc"; - options = { - desc = "Continue"; - }; - } - { - mode = ["n"]; - action = ":DapStepOver"; - key = "dO"; - options = { - desc = "Step over"; - }; - } - { - mode = ["n"]; - action = ":DapStepInto"; - key = "di"; - options = { - desc = "Step Into"; - }; - } - { - mode = ["n"]; - action = ":DapStepOut"; - key = "do"; - options = { - desc = "Step Out"; - }; - } - { - mode = ["n"]; - action = "lua require('dap').pause()"; - key = "dp"; - options = { - desc = "Pause"; - }; - } - { - mode = ["n"]; - action = ":DapToggleBreakpoint"; - key = "db"; - options = { - desc = "Toggle Breakpoint"; - }; - } - { - mode = ["n"]; - action = "lua require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))"; - key = "dB"; - options = { - desc = "Breakpoint (conditional)"; - }; - } - { - mode = ["n"]; - action = ":DapToggleRepl"; - key = "dR"; - options = { - desc = "Toggle REPL"; - }; - } - { - mode = ["n"]; - action = "lua require('dap').run_last()"; - key = "dr"; - options = { - desc = "Run Last"; - }; - } - { - mode = ["n"]; - action = "lua require('dap').session()"; - key = "ds"; - options = { - desc = "Session"; - }; - } - { - mode = ["n"]; - action = ":DapTerminate"; - key = "dt"; - options = { - desc = "Terminate"; - }; - } - { - mode = ["n"]; - action = "lua require('dap.ui.widgets').hover()"; - key = "dw"; - options = { - desc = "Hover Widget"; - }; - } - { - mode = ["n"]; - action = "lua require('dapui').toggle()"; - key = "du"; - options = { - desc = "Toggle UI"; - }; - } - { - mode = ["n"]; - action = "lua require('dapui').eval()"; - key = "de"; - options = { - desc = "Eval"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/default.nix b/home/nixvim/plugins/default.nix deleted file mode 100644 index a724170..0000000 --- a/home/nixvim/plugins/default.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ - imports = [ - # ./ai/codeium.nix - - # ./completion/blink.nix - ./completion/cmp.nix - ./completion/lspkind.nix - - ./debug/dap.nix - - ./editor/neotree.nix - ./editor/undotree.nix - ./editor/whichkey.nix - ./editor/yazi.nix - - ./theme - ./luasnip - ./telescope - - ./git/gitsigns.nix - - ./lsp/conform.nix - ./lsp/fidget.nix - ./lsp/lsp.nix - ./lsp/lspsaga.nix - ./lsp/trouble.nix - - ./lang/cpp.nix - ./lang/css.nix - ./lang/docker.nix - ./lang/html.nix - ./lang/json.nix - ./lang/lua.nix - ./lang/markdown.nix - ./lang/nix.nix - # ./lang/python.nix - ./lang/shell.nix - ./lang/typescript.nix - ./lang/yaml.nix - - ./treesitter/treesitter.nix - ./treesitter/treesitter-textobjects.nix - - ./ui/alpha.nix - ./ui/bufferline.nix - ./ui/general.nix - ./ui/flash.nix - ./ui/indent-blankline.nix - ./ui/lualine.nix - ./ui/noice.nix - ./ui/notify.nix - ./ui/precognition.nix - ./ui/toggleterm.nix - ./ui/ufo.nix - - ./util/colorizer.nix - ./util/debugprint.nix - ./util/harpoon.nix - ./util/kulala.nix - ./util/mini.nix - ./util/nvim-autopairs.nix - ./util/nvim-surround.nix - ./util/plenary.nix - ./util/persistence.nix - ./util/project-nvim.nix - ./util/snacks.nix - ./util/wakatime.nix - ]; -} diff --git a/home/nixvim/plugins/editor/neotree.nix b/home/nixvim/plugins/editor/neotree.nix deleted file mode 100644 index a1dea82..0000000 --- a/home/nixvim/plugins/editor/neotree.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ - plugins.neo-tree = { - enable = true; - closeIfLastWindow = true; - sources = [ - "filesystem" - "buffers" - "git_status" - "document_symbols" - ]; - popupBorderStyle = "rounded"; # “NC”, “double”, “none”, “rounded”, “shadow”, “single”, “solid” or raw lua code - - filesystem = { - bindToCwd = false; - useLibuvFileWatcher = true; - followCurrentFile.enabled = true; - }; - - defaultComponentConfigs = { - gitStatus = { - symbols = { - added = " "; - conflict = "󰩌 "; - deleted = "󱂥 "; - ignored = " "; - modified = " "; - renamed = " "; - staged = "✓ "; - unstaged = " "; - untracked = " "; - }; - }; - }; - - window.mappings = { - "" = "none"; - }; - }; - - keymaps = [ - { - mode = "n"; - key = "e"; - action = "Neotree toggle"; - options = { - silent = true; - desc = "Explorer NeoTree (root dir)"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/editor/undotree.nix b/home/nixvim/plugins/editor/undotree.nix deleted file mode 100644 index 3a2b787..0000000 --- a/home/nixvim/plugins/editor/undotree.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - plugins.undotree = { - enable = true; - settings = { - autoOpenDiff = true; - focusOnToggle = true; - CursorLine = true; - DiffAutoOpen = true; - DiffCommand = "diff"; - DiffpanelHeight = 10; - HelpLine = true; - HighlightChangedText = true; - HighlightChangedWithSign = true; - HighlightSyntaxAdd = "DiffAdd"; - HighlightSyntaxChange = "DiffChange"; - HighlightSyntaxDel = "DiffDelete"; - RelativeTimestamp = true; - SetFocusWhenToggle = true; - ShortIndicators = false; - }; - }; - - keymaps = [ - { - mode = "n"; - key = "ut"; - action = "UndotreeToggle"; - options = { - silent = true; - desc = "Undotree"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/editor/whichkey.nix b/home/nixvim/plugins/editor/whichkey.nix deleted file mode 100644 index 50f7b0b..0000000 --- a/home/nixvim/plugins/editor/whichkey.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ - plugins.which-key = { - enable = true; - settings = { - icons = { - breadcrumb = "»"; - group = "+"; - separator = ""; # ➜ - }; - win = { - border = "rounded"; - padding = [ - 1 - 1 - ]; - }; - spec = [ - # General Mappings - { - __unkeyed-1 = "c"; - mode = [ - "n" - "v" - ]; - group = "+code"; - } - { - __unkeyed-1 = "f"; - mode = "n"; - group = "+find/file"; - } - - { - __unkeyed-1 = "g"; - mode = [ - "n" - "v" - ]; - group = "+git"; - } - - { - __unkeyed-1 = "q"; - mode = "n"; - group = "+quit/session"; - } - - { - __unkeyed-1 = "s"; - mode = "n"; - group = "+search"; - } - - { - __unkeyed-1 = "u"; - mode = "n"; - group = "+ui"; - } - - { - __unkeyed-1 = "w"; - mode = "n"; - group = "+windows"; - } - ]; - }; - }; -} diff --git a/home/nixvim/plugins/editor/yazi.nix b/home/nixvim/plugins/editor/yazi.nix deleted file mode 100644 index 95d718b..0000000 --- a/home/nixvim/plugins/editor/yazi.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - plugins.yazi.enable = true; - - keymaps = [ - { - mode = "n"; - key = "E"; - action.__raw = '' - function() - require('yazi').yazi() - end - ''; - options = { - desc = "Yazi toggle"; - silent = true; - }; - } - ]; -} diff --git a/home/nixvim/plugins/git/gitsigns.nix b/home/nixvim/plugins/git/gitsigns.nix deleted file mode 100644 index 85b09aa..0000000 --- a/home/nixvim/plugins/git/gitsigns.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ - plugins.gitsigns = { - enable = true; - settings = { - trouble = true; - current_line_blame = false; - }; - }; - - keymaps = [ - { - mode = [ - "n" - "v" - ]; - key = "gh"; - action = "gitsigns"; - options = { - silent = true; - desc = "+hunks"; - }; - } - { - mode = "n"; - key = "ghb"; - action = ":Gitsigns blame_line"; - options = { - silent = true; - desc = "Blame line"; - }; - } - { - mode = "n"; - key = "ghd"; - action = ":Gitsigns diffthis"; - options = { - silent = true; - desc = "Diff This"; - }; - } - { - mode = "n"; - key = "ghp"; - action = ":Gitsigns preview_hunk"; - options = { - silent = true; - desc = "Preview hunk"; - }; - } - { - mode = "n"; - key = "ghR"; - action = ":Gitsigns reset_buffer"; - options = { - silent = true; - desc = "Reset Buffer"; - }; - } - { - mode = [ - "n" - "v" - ]; - key = "ghr"; - action = ":Gitsigns reset_hunk"; - options = { - silent = true; - desc = "Reset Hunk"; - }; - } - { - mode = [ - "n" - "v" - ]; - key = "ghs"; - action = ":Gitsigns stage_hunk"; - options = { - silent = true; - desc = "Stage Hunk"; - }; - } - { - mode = "n"; - key = "ghS"; - action = ":Gitsigns stage_buffer"; - options = { - silent = true; - desc = "Stage Buffer"; - }; - } - { - mode = "n"; - key = "ghu"; - action = ":Gitsigns undo_stage_hunk"; - options = { - silent = true; - desc = "Undo Stage Hunk"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/lang/cpp.nix b/home/nixvim/plugins/lang/cpp.nix deleted file mode 100644 index db917e0..0000000 --- a/home/nixvim/plugins/lang/cpp.nix +++ /dev/null @@ -1,92 +0,0 @@ -{pkgs, ...}: { - plugins = { - conform-nvim.settings = { - formatters_by_ft = { - cpp = ["clang-format"]; - }; - - formatters = { - clang-format = { - command = "${pkgs.clang-tools}/bin/clang-format"; - }; - }; - }; - - lsp.servers = { - cmake.enable = true; - clangd = { - enable = true; - cmd = [ - "clangd" - "--offset-encoding=utf-16" - "--header-insertion=iwyu" - "--background-index" - "--clang-tidy" - "--all-scopes-completion" - "--completion-style=detailed" - "--function-arg-placeholders" - "--fallback-style=llvm" - "-j=6" - ]; - onAttach.function = '' - vim.keymap.set('n', 'gh', "ClangdSwitchSourceHeader", { desc = "Switch Source/Header (C/C++)", buffer = bufnr }) - - require("clangd_extensions.inlay_hints").setup_autocmd() - require("clangd_extensions.inlay_hints").set_inlay_hints() - ''; - extraOptions = { - init_options = { - usePlaceholders = true; - completeUnimported = true; - clangdFileStatus = true; - }; - }; - }; - }; - - clangd-extensions = { - enable = true; - settings = { - inlay_hints.inline = false; - codelens.enable = true; - ast = { - role_icons = { - type = ""; - declaration = ""; - expression = ""; - specifier = ""; - statement = ""; - templateArgument = ""; - }; - kind_icons = { - compound = ""; - recovery = ""; - translationUnit = ""; - packExpansion = ""; - templateTypeParm = ""; - templateTemplateParm = ""; - templateParamObject = ""; - }; - }; - }; - }; - - dap = { - adapters.executables.lldb.command = "${pkgs.lldb}/bin/lldb-vscode"; - - configurations.cpp = [ - { - name = "C++"; - type = "lldb"; - request = "launch"; - cwd = "\${workspaceFolder}"; - program.__raw = '' - function() - return vim.fn.input('Executable path: ', vim.fn.getcwd() .. '/', 'file') - end - ''; - } - ]; - }; - }; -} diff --git a/home/nixvim/plugins/lang/css.nix b/home/nixvim/plugins/lang/css.nix deleted file mode 100644 index 408cb1a..0000000 --- a/home/nixvim/plugins/lang/css.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - plugins = { - conform-nvim.settings = { - formatters_by_ft.css = [ - "prettierd" - "prettier" - ]; - - formatters = { - prettierd.command = "${pkgs.prettierd}/bin/prettierd"; - prettier.command = "${pkgs.nodePackages.prettier}/bin/prettier"; - }; - }; - - lsp.servers = { - cssls = { - enable = true; - cmd = [ - "${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server" - "--stdio" - ]; - }; - - tailwindcss = { - enable = true; - cmd = [ - (lib.getExe pkgs.tailwindcss-language-server) - "--stdio" - ]; - }; - }; - }; -} diff --git a/home/nixvim/plugins/lang/docker.nix b/home/nixvim/plugins/lang/docker.nix deleted file mode 100644 index d354cb3..0000000 --- a/home/nixvim/plugins/lang/docker.nix +++ /dev/null @@ -1,20 +0,0 @@ -{pkgs, ...}: { - plugins = { - lsp.servers = { - dockerls.enable = true; - docker_compose_language_service.enable = true; - }; - - lint = { - lintersByFt = { - docker = ["hadolint"]; - }; - - linters = { - hadolint = { - cmd = "${pkgs.hadolint}/bin/hadolint"; - }; - }; - }; - }; -} diff --git a/home/nixvim/plugins/lang/html.nix b/home/nixvim/plugins/lang/html.nix deleted file mode 100644 index f7b32da..0000000 --- a/home/nixvim/plugins/lang/html.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - plugins = { - conform-nvim.settings = { - formatters_by_ft.html = [ - "prettierd" - "prettier" - ]; - - formatters = { - prettierd.command = "${pkgs.prettierd}/bin/prettierd"; - prettier.command = "${pkgs.nodePackages.prettier}/bin/prettier"; - }; - }; - - lsp = { - servers = { - html = { - enable = true; - cmd = [ - "${pkgs.vscode-langservers-extracted}/bin/vscode-html-language-server" - "--stdio" - ]; - }; - }; - - enabledServers = [ - { - name = "emmet_language_server"; - extraOptions = { - cmd = [ - (lib.getExe pkgs.emmet-language-server) - "--stdio" - ]; - filetypes = ["html"]; - }; - } - ]; - }; - }; -} diff --git a/home/nixvim/plugins/lang/json.nix b/home/nixvim/plugins/lang/json.nix deleted file mode 100644 index 8ad6fda..0000000 --- a/home/nixvim/plugins/lang/json.nix +++ /dev/null @@ -1,31 +0,0 @@ -{pkgs, ...}: { - plugins = { - conform-nvim.settings = { - formatters_by_ft = { - json = ["jq"]; - }; - - formatters = { - jq = { - command = "${pkgs.jq}/bin/jq"; - }; - }; - }; - - lint = { - lintersByFt = { - json = ["jsonlint"]; - }; - - linters = { - jsonlint = { - cmd = "${pkgs.nodePackages_latest.jsonlint}/bin/jsonlint"; - }; - }; - }; - - lsp.servers.jsonls = { - enable = true; - }; - }; -} diff --git a/home/nixvim/plugins/lang/lua.nix b/home/nixvim/plugins/lang/lua.nix deleted file mode 100644 index bc9895c..0000000 --- a/home/nixvim/plugins/lang/lua.nix +++ /dev/null @@ -1,22 +0,0 @@ -{pkgs, ...}: { - plugins = { - lsp.servers.lua_ls.enable = true; - - conform-nvim.settings = { - formatters_by_ft = { - lua = ["stylua"]; - }; - - formatters = { - stylua = { - command = "${pkgs.stylua}/bin/stylua"; - }; - }; - }; - - lint = { - lintersByFt.lua = ["luacheck"]; - linters.luacheck.cmd = "${pkgs.lua54Packages.luacheck}/bin/luacheck"; - }; - }; -} diff --git a/home/nixvim/plugins/lang/markdown.nix b/home/nixvim/plugins/lang/markdown.nix deleted file mode 100644 index 459a48a..0000000 --- a/home/nixvim/plugins/lang/markdown.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ - lib, - pkgs, - ... -}: { - extraPackages = with pkgs; [ - marksman - ]; - - plugins = { - clipboard-image = { - enable = true; - clipboardPackage = pkgs.wl-clipboard; - }; - - image = { - enable = lib.nixvim.enableExceptInTests; - settings.integrations.markdown = { - clearInInsertMode = true; - onlyRenderImageAtCursor = true; - }; - }; - - markdown-preview = { - enable = true; - }; - - render-markdown = { - enable = true; - }; - - lsp.servers = { - marksman.enable = true; - - ltex = { - enable = true; - filetypes = [ - "markdown" - "text" - ]; - - settings.completionEnabled = true; - - extraOptions = { - checkFrequency = "save"; - language = "en-GB"; - }; - }; - }; - # markdownlint-cli2 have problems in build. - # need to try a newer version in future, - # lint = { - # lintersByFt.md = [ "markdownlint-cli2" ]; - # linters.markdownlint-cli2.cmd = "${pkgs.markdownlint-cli2}/bin/markdownlint-cli2"; - # }; - }; - - keymaps = [ - { - mode = "n"; - key = "m"; - action = "MarkdownPreviewToggle"; - options = { - silent = true; - desc = "Toggle markdown preview"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/lang/nix.nix b/home/nixvim/plugins/lang/nix.nix deleted file mode 100644 index fd7aee0..0000000 --- a/home/nixvim/plugins/lang/nix.nix +++ /dev/null @@ -1,49 +0,0 @@ -{pkgs, ...}: let - flake = "/home/atp/System/atpos/"; -in { - plugins = { - nix.enable = true; - hmts.enable = true; - nix-develop.enable = true; - - conform-nvim.settings = { - formatters_by_ft = { - nix = ["alejandra"]; - }; - - formatters = { - alejandra = { - command = "${pkgs.alejandra}/bin/alejandra"; - }; - }; - }; - - lint = { - lintersByFt = { - nix = ["statix"]; - }; - - linters = { - statix = { - cmd = "${pkgs.statix}/bin/statix"; - }; - }; - }; - - lsp.servers.nixd = { - enable = true; - settings = { - nixpkgs.expr = ''import (builtins.getFlake "${flake}").inputs.nixpkgs { }''; - options = { - nixos.expr = ''(builtins.getFlake "${flake}").nixosConfigurations.alfhiem.options''; - home_manager.expr = ''(builtins.getFlake "${flake}").nixosConfigurations.alfhiem.options''; - }; - flake_parts.expr = ''let flake = builtins.getFlake ("${flake}"); in flake.debug.options // flake.currentSystem.options''; - }; - }; - }; - - extraConfigVim = '' - au BufRead,BufNewFile flake.lock setf json - ''; -} diff --git a/home/nixvim/plugins/lang/python.nix b/home/nixvim/plugins/lang/python.nix deleted file mode 100644 index 96c02d4..0000000 --- a/home/nixvim/plugins/lang/python.nix +++ /dev/null @@ -1,44 +0,0 @@ -{pkgs, ...}: { - plugins = { - dap.extensions.dap-python.enable = true; - - conform-nvim.settings = { - formatters_by_ft.python = [ - "ruff_format" - "ruff_organize_imports" - ]; - }; - - lint = { - lintersByFt.python = ["mypy"]; - linters.mypy = { - cmd = "${pkgs.mypy}/bin/mypy"; - args = ["--ignore-missing-imports"]; - }; - }; - - lsp.servers = { - pyright = { - enable = true; - extraOptions.settings = { - # Using Ruff's import organizer - pyright.disableOrganizeImports = true; - python.analysis = { - # Ignore all files for analysis to exclusively use Ruff for linting - ignore.__raw = ''{ '*' }''; - }; - }; - }; - - ruff = { - enable = true; - onAttach.function = '' - if client.name == 'ruff' then - -- Disable hover in favor of Pyright - client.server_capabilities.hoverProvider = false - end - ''; - }; - }; - }; -} diff --git a/home/nixvim/plugins/lang/shell.nix b/home/nixvim/plugins/lang/shell.nix deleted file mode 100644 index 6ee8a35..0000000 --- a/home/nixvim/plugins/lang/shell.nix +++ /dev/null @@ -1,16 +0,0 @@ -{pkgs, ...}: { - plugins = { - conform-nvim.settings = { - formatters_by_ft = { - sh = ["shfmt"]; - }; - formatters = { - shfmt = { - command = "${pkgs.shfmt}/bin/shfmt"; - }; - }; - }; - - lsp.servers.bashls.enable = true; - }; -} diff --git a/home/nixvim/plugins/lang/typescript.nix b/home/nixvim/plugins/lang/typescript.nix deleted file mode 100644 index 607fa84..0000000 --- a/home/nixvim/plugins/lang/typescript.nix +++ /dev/null @@ -1,90 +0,0 @@ -{pkgs, ...}: { - plugins = { - conform-nvim.settings = { - formatters_by_ft = { - javascript = ["eslint_d"]; - javascriptreact = ["eslint_d"]; - typescript = ["eslint_d"]; - typescriptreact = ["eslint_d"]; - svelte = ["eslint_d"]; - }; - - formatters.eslint_d = { - command = "${pkgs.eslint_d}/bin/eslint_d"; - }; - }; - - lsp.servers = { - svelte.enable = true; - - eslint = { - enable = true; - filetypes = [ - "javascript" - "javascriptreact" - "javascript.jsx" - "typescript" - "typescriptreact" - "typescript.tsx" - "vue" - "html" - "markdown" - "json" - "jsonc" - "yaml" - "toml" - "xml" - "gql" - "graphql" - "svelte" - "css" - "less" - "scss" - "pcss" - "postcss" - ]; - }; - - ts_ls = { - enable = true; - filetypes = [ - "javascript" - "javascriptreact" - "typescript" - "typescriptreact" - "svelte" - ]; - - settings = { - complete_function_calls = true; - vtsls = { - autoUseWorkspaceTsdk = true; - experimental = { - completion = { - enableServerSideFuzzyMatch = true; - }; - }; - }; - - typescript = { - updateImportsOnFileMove.enabled = "always"; - suggest = { - completeFunctionCalls = true; - }; - - inlayHints = { - enumMemberValues.enabled = true; - functionLikeReturnTypes.enabled = true; - parameterNames.enabled = "literals"; - parameterTypes.enabled = true; - propertyDeclarationTypes.enabled = true; - variableType.enabled = false; - }; - }; - }; - }; - }; - - ts-autotag.enable = true; - }; -} diff --git a/home/nixvim/plugins/lang/yaml.nix b/home/nixvim/plugins/lang/yaml.nix deleted file mode 100644 index 9485eee..0000000 --- a/home/nixvim/plugins/lang/yaml.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - plugins.lsp.servers.yamlls = { - enable = true; - extraOptions = { - capabilities = { - textDocument = { - foldingRange = { - dynamicRegistration = false; - lineFoldingOnly = true; - }; - }; - }; - }; - }; -} diff --git a/home/nixvim/plugins/lsp/conform.nix b/home/nixvim/plugins/lsp/conform.nix deleted file mode 100644 index cd8d387..0000000 --- a/home/nixvim/plugins/lsp/conform.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - plugins.conform-nvim = { - enable = true; - settings = { - format_on_save = { - lspFallback = true; - timeoutMs = 500; - }; - formatters_by_ft = { - # Use the "_" filetype to run formatters on filetypes that don't have other formatters configured. - "_" = [ - "squeeze_blanks" - "trim_whitespace" - "trim_newlines" - ]; - }; - formatters = { - _ = { - command = "${pkgs.gawk}/bin/gawk"; - }; - squeeze_blanks = { - command = lib.getExe' pkgs.coreutils "cat"; - }; - }; - }; - }; - - keymaps = [ - { - mode = [ - "n" - "v" - ]; - key = "cf"; - action = "lua require('conform').format()"; - options = { - silent = true; - desc = "Format"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/lsp/fidget.nix b/home/nixvim/plugins/lsp/fidget.nix deleted file mode 100644 index e04dcd4..0000000 --- a/home/nixvim/plugins/lsp/fidget.nix +++ /dev/null @@ -1,91 +0,0 @@ -{lib, ...}: { - plugins.fidget = { - enable = true; - settings = { - logger = { - level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace” - float_precision = 0.01; # Limit the number of decimals displayed for floats - }; - notification = { - poll_rate = 10; # How frequently to update and render notifications - filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace” - history_size = 128; # Number of removed messages to retain in history - override_vim_notify = true; - - window = { - normal_hl = "Comment"; - winblend = 0; - border = "none"; # none, single, double, rounded, solid, shadow - zindex = 45; - max_width = 0; - max_height = 0; - x_padding = 1; - y_padding = 0; - align = "bottom"; - relative = "editor"; - }; - view = { - stack_upwards = true; # Display notification items from bottom to top - icon_separator = " "; # Separator between group name and icon - group_separator = "---"; # Separator between notification groups - group_separator_hl = - # Highlight group used for group separator - "Comment"; - }; - }; - progress = { - poll_rate = 0; # How and when to poll for progress messages - suppress_on_insert = true; # Suppress new messages while in insert mode - ignore_done_already = false; # Ignore new tasks that are already complete - ignore_empty_message = false; # Ignore new tasks that don't contain a message - clear_on_detach = - # Clear notification group when LSP server detaches - '' - function(client_id) - local client = vim.lsp.get_client_by_id(client_id) - return client and client.name or nil - end - ''; - notification_group = - # How to get a progress message's notification group key - '' - function(msg) return msg.lsp_client.name end - ''; - ignore = []; # List of LSP servers to ignore - lsp = { - progress_ringbuf_size = 0; # Configure the nvim's LSP progress ring buffer size - }; - display = { - render_limit = 16; # How many LSP messages to show at once - done_ttl = 3; # How long a message should persist after completion - done_icon = "✔"; # Icon shown when all LSP progress tasks are complete - done_style = "Constant"; # Highlight group for completed LSP tasks - progress_ttl = lib.nixvim.mkRaw "math.huge"; # How long a message should persist when in progress - progress_icon = { - pattern = "dots"; - period = 1; - }; # Icon shown when LSP progress tasks are in progress - progress_style = "WarningMsg"; # Highlight group for in-progress LSP tasks - group_style = "Title"; # Highlight group for group name (LSP server name) - icon_style = "Question"; # Highlight group for group icons - priority = 30; # Ordering priority for LSP notification group - skip_history = true; # Whether progress notifications should be omitted from history - format_message = '' - require ("fidget.progress.display").default_format_message - ''; # How to format a progress message - format_annote = '' - function (msg) return msg.title end - ''; # How to format a progress annotation - format_group_name = '' - function (group) return tostring (group) end - ''; # How to format a progress notification group's name - overrides = { - rust_analyzer = { - name = "rust-analyzer"; - }; - }; # Override options from the default notification config - }; - }; - }; - }; -} diff --git a/home/nixvim/plugins/lsp/lsp.nix b/home/nixvim/plugins/lsp/lsp.nix deleted file mode 100644 index dc3355e..0000000 --- a/home/nixvim/plugins/lsp/lsp.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - plugins = { - lsp-signature.enable = true; - - lsp = { - enable = true; - servers.typos_lsp.enable = true; - keymaps.lspBuf = { - "" = "signature_help"; - "gi" = "implementation"; - }; - }; - lint.enable = true; - }; - - keymaps = [ - { - mode = "n"; - key = "cl"; - action = "LspInfo"; - options.desc = "Lsp Info"; - } - ]; -} diff --git a/home/nixvim/plugins/lsp/lspsaga.nix b/home/nixvim/plugins/lsp/lspsaga.nix deleted file mode 100644 index 8c79b2b..0000000 --- a/home/nixvim/plugins/lsp/lspsaga.nix +++ /dev/null @@ -1,184 +0,0 @@ -{ - plugins = { - lspsaga = { - enable = true; - settings = { - beacon.enable = true; - outline = { - close_after_jump = true; - layout = "normal"; # normal or float - win_position = "right"; # left or right - keys = { - jump = "e"; - quit = "q"; - toggle_or_jump = "o"; - }; - }; - symbol_in_winbar = { - enable = true; # Breadcrumbs - show_file = false; - }; - rename.keys = { - exec = ""; - quit = [ - "" - "" - ]; - select = "x"; - }; - scroll_preview = { - scroll_up = ""; - scroll_down = ""; - }; - lightbulb = { - enable = true; - sign = true; - }; - code_action = { - show_server_name = true; - num_shortcut = false; - only_in_cursor = false; - keys = { - exec = ""; - quit = [ - "" - "q" - ]; - }; - }; - ui.border = "rounded"; # One of none, single, double, rounded, solid, shadow - hover = { - openCmd = "!firfox"; - openLink = "gx"; - }; - }; - }; - - which-key.settings.spec = [ - { - __unkeyed-1 = "gp"; - mode = "n"; - group = "+peek"; - } - ]; - }; - - keymaps = [ - { - mode = "n"; - key = "K"; - # action = "Lspsaga hover_doc"; - action.__raw = '' - function() - local winid = require("ufo").peekFoldedLinesUnderCursor() - if not winid then - vim.cmd("Lspsaga hover_doc") - end - end - ''; - options = { - desc = "Hover"; - silent = true; - }; - } - { - mode = "n"; - key = "lo"; - action = "Lspsaga outline"; - options = { - desc = "Outline"; - silent = true; - }; - } - { - mode = "n"; - key = "lr"; - action = "Lspsaga rename"; - options = { - desc = "Rename"; - silent = true; - }; - } - { - mode = "n"; - key = "ca"; - action = "Lspsaga code_action"; - options = { - desc = "Code Action"; - silent = true; - }; - } - { - mode = "n"; - key = "cd"; - action = "Lspsaga show_buf_diagnostics"; - options = { - desc = "Line Diagnostics"; - silent = true; - }; - } - { - mode = "n"; - key = "gd"; - action = "Lspsaga goto_definition"; - options = { - desc = "Goto Definition"; - silent = true; - }; - } - { - mode = "n"; - key = "gt"; - action = "Lspsaga goto_type_definition"; - options = { - desc = "Type Definitions"; - silent = true; - }; - } - { - mode = "n"; - key = "gpd"; - action = "Lspsaga peek_definition"; - options = { - desc = "Peek Definitions"; - silent = true; - }; - } - { - mode = "n"; - key = "gpt"; - action = "Lspsaga peek_type_definition"; - options = { - desc = "Peek Type Definitions"; - silent = true; - }; - } - { - mode = "n"; - key = "gl"; - action = "Lspsaga show_line_diagnostics"; - options = { - desc = "Line Diagnostics"; - silent = true; - }; - } - { - mode = "n"; - key = "[d"; - action = "Lspsaga diagnostic_jump_next"; - options = { - desc = "Next Diagnostic"; - silent = true; - }; - } - { - mode = "n"; - key = "]d"; - action = "Lspsaga diagnostic_jump_prev"; - options = { - desc = "Previous Diagnostic"; - silent = true; - }; - } - ]; -} diff --git a/home/nixvim/plugins/lsp/trouble.nix b/home/nixvim/plugins/lsp/trouble.nix deleted file mode 100644 index 888ac18..0000000 --- a/home/nixvim/plugins/lsp/trouble.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - plugins.trouble = { - enable = true; - settings.auto_close = true; - }; - - keymaps = [ - { - mode = "n"; - key = "x"; - action = "+diagnostics/quickfix"; - } - { - mode = "n"; - key = "xx"; - action = "TroubleToggle"; - options = { - silent = true; - desc = "Document Diagnostics (Trouble)"; - }; - } - { - mode = "n"; - key = "xX"; - action = "TroubleToggle workspace_diagnostics"; - options = { - silent = true; - desc = "Workspace Diagnostics (Trouble)"; - }; - } - { - mode = "n"; - key = "xt"; - action = "TroubleToggle todo"; - options = { - silent = true; - desc = "Todo (Trouble)"; - }; - } - { - mode = "n"; - key = "xq"; - action = "TodoQuickFix"; - options = { - silent = true; - desc = "Quickfix List (Trouble)"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/luasnip/default.nix b/home/nixvim/plugins/luasnip/default.nix deleted file mode 100644 index 2efb62d..0000000 --- a/home/nixvim/plugins/luasnip/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{pkgs, ...}: { - plugins.luasnip = { - enable = true; - settings = { - enable_autosnippets = true; - store_selection_keys = ""; - }; - fromVscode = [ - { - lazyLoad = true; - paths = "${pkgs.vimPlugins.friendly-snippets}"; - } - ]; - }; -} diff --git a/home/nixvim/plugins/telescope/default.nix b/home/nixvim/plugins/telescope/default.nix deleted file mode 100644 index fe99f39..0000000 --- a/home/nixvim/plugins/telescope/default.nix +++ /dev/null @@ -1,144 +0,0 @@ -{pkgs, ...}: { - plugins = { - project-nvim.enableTelescope = true; - telescope = { - enable = true; - extensions = { - fzf-native.enable = true; - undo.enable = true; - ui-select = { - settings = { - specific_opts = { - codeactions = true; - }; - }; - }; - }; - - settings.defaults = { - prompt_prefix = "  "; - color_devicons = true; - set_env.COLORTERM = "truecolor"; - - mappings = { - i = { - # Have Telescope not to enter a normal-like mode when hitting escape (and instead exiting), you can map to do so via: - "".__raw = '' - function(...) - return require("telescope.actions").close(...) - end''; - "".__raw = '' - function(...) - require('trouble.providers.telescope').open_with_trouble(...); - end - ''; - }; - n = { - "".__raw = '' - function(...) - require('trouble.providers.telescope').open_with_trouble(...); - end - ''; - }; - }; - # trim leading whitespace from grep - vimgrep_arguments = [ - "${pkgs.ripgrep}/bin/rg" - "--color=never" - "--no-heading" - "--with-filename" - "--line-number" - "--column" - "--smart-case" - "--trim" - ]; - }; - keymaps = { - "fp" = { - action = "projects"; - options.desc = "Search Todo"; - }; - "st" = { - action = "todo-comments"; - options.desc = "Search Todo"; - }; - "sn" = { - action = "notify"; - options.desc = "Search Notifications"; - }; - "su" = { - action = "undo"; - options.desc = "Search Undo"; - }; - "" = { - action = "find_files"; - options.desc = "Find project files"; - }; - "ff" = { - action = "find_files hidden=true"; - options.desc = "Find project files"; - }; - "/" = { - action = "live_grep"; - options.desc = "Grep (root dir)"; - }; - ":" = { - action = "command_history"; - options.desc = "Command History"; - }; - "fr" = { - action = "oldfiles"; - options.desc = "Recent"; - }; - "" = { - mode = [ - "n" - "i" - ]; - action = "registers"; - options.desc = "Select register to paste"; - }; - "gc" = { - action = "git_commits"; - options.desc = "commits"; - }; - "sa" = { - action = "autocommands"; - options.desc = "Auto Commands"; - }; - "sc" = { - action = "commands"; - options.desc = "Commands"; - }; - "sd" = { - action = "diagnostics bufnr=0"; - options.desc = "Workspace diagnostics"; - }; - "sh" = { - action = "help_tags"; - options.desc = "Help pages"; - }; - "sk" = { - action = "keymaps"; - options.desc = "Key maps"; - }; - "sM" = { - action = "man_pages"; - options.desc = "Man pages"; - }; - "sm" = { - action = "marks"; - options.desc = "Jump to Mark"; - }; - "so" = { - action = "vim_options"; - options.desc = "Options"; - }; - "uC" = { - action = "colorscheme"; - options.desc = "Colorscheme preview"; - }; - }; - }; - }; -} diff --git a/home/nixvim/plugins/theme/default.nix b/home/nixvim/plugins/theme/default.nix deleted file mode 100644 index a386f9f..0000000 --- a/home/nixvim/plugins/theme/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - colorschemes = { - catppuccin = { - enable = true; - settings = { - background = { - light = "macchiato"; - dark = "mocha"; - }; - flavour = "macchiato"; # “latte”, “mocha”, “frappe”, “macchiato”, “auto” - transparent_background = true; - integrations = { - cmp = true; - flash = true; - fidget = true; - gitsigns = true; - indent_blankline.enabled = true; - lsp_trouble = true; - mini.enabled = true; - neotree = true; - noice = true; - notify = true; - telescope.enabled = true; - treesitter = true; - treesitter_context = true; - which_key = true; - native_lsp = { - enabled = true; - inlay_hints = { - background = true; - }; - virtual_text = { - errors = ["italic"]; - hints = ["italic"]; - information = ["italic"]; - warnings = ["italic"]; - ok = ["italic"]; - }; - underlines = { - errors = ["underline"]; - hints = ["underline"]; - information = ["underline"]; - warnings = ["underline"]; - }; - }; - }; - }; - }; - }; -} diff --git a/home/nixvim/plugins/treesitter/treesitter-textobjects.nix b/home/nixvim/plugins/treesitter/treesitter-textobjects.nix deleted file mode 100644 index d550e9e..0000000 --- a/home/nixvim/plugins/treesitter/treesitter-textobjects.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - plugins.treesitter-textobjects = { - enable = true; - select = { - enable = true; - lookahead = true; - keymaps = { - "aa" = "@parameter.outer"; - "ia" = "@parameter.inner"; - "af" = "@function.outer"; - "if" = "@function.inner"; - "ac" = "@class.outer"; - "ic" = "@class.inner"; - "ii" = "@conditional.inner"; - "ai" = "@conditional.outer"; - "il" = "@loop.inner"; - "al" = "@loop.outer"; - "at" = "@comment.outer"; - }; - }; - move = { - enable = true; - gotoNextStart = { - "]m" = "@function.outer"; - "]]" = "@class.outer"; - }; - gotoNextEnd = { - "]M" = "@function.outer"; - "][" = "@class.outer"; - }; - gotoPreviousStart = { - "[m" = "@function.outer"; - "[[" = "@class.outer"; - }; - gotoPreviousEnd = { - "[M" = "@function.outer"; - "[]" = "@class.outer"; - }; - }; - swap = { - enable = true; - swapNext = { - "a" = "@parameters.inner"; - }; - swapPrevious = { - "A" = "@parameter.outer"; - }; - }; - }; -} diff --git a/home/nixvim/plugins/treesitter/treesitter.nix b/home/nixvim/plugins/treesitter/treesitter.nix deleted file mode 100644 index 408db1d..0000000 --- a/home/nixvim/plugins/treesitter/treesitter.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - plugins = { - treesitter = { - enable = true; - settings = { - highlight.enable = true; - incremental_selection.enable = true; - indent.enable = true; - }; - nixvimInjections = true; - }; - treesitter-context.enable = true; - }; -} diff --git a/home/nixvim/plugins/ui/alpha.nix b/home/nixvim/plugins/ui/alpha.nix deleted file mode 100644 index cdbd6db..0000000 --- a/home/nixvim/plugins/ui/alpha.nix +++ /dev/null @@ -1,178 +0,0 @@ -{ - plugins.alpha = { - enable = true; - layout = let - padding = val: { - type = "padding"; - inherit val; - }; - in [ - (padding 4) - { - opts = { - hl = "AlphaHeader"; - position = "center"; - }; - type = "text"; - val = [ - "███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗" - "████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║" - "██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║" - "██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║" - "██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║" - "╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝" - ]; - } - (padding 6) - { - type = "button"; - val = " Find File"; - on_press.raw = "require('telescope.builtin').find_files"; - opts = { - keymap = [ - "n" - "f" - ":Telescope find_files " - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "f"; - - position = "center"; - cursor = 3; - width = 40; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; - } - (padding 1) - { - type = "button"; - val = " New File"; - on_press.__raw = "function() vim.cmd[[ene]] end"; - opts = { - keymap = [ - "n" - "n" - ":ene startinsert " - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "n"; - - position = "center"; - cursor = 3; - width = 40; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; - } - (padding 1) - { - type = "button"; - val = "󰈚 Recent Files"; - on_press.raw = "require('telescope.builtin').oldfiles"; - opts = { - keymap = [ - "n" - "r" - ":Telescope oldfiles " - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "r"; - - position = "center"; - cursor = 3; - width = 40; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; - } - (padding 1) - { - type = "button"; - val = "󰈭 Find Word"; - on_press.raw = "require('telescope.builtin').live_grep"; - opts = { - keymap = [ - "n" - "g" - ":Telescope live_grep " - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "g"; - - position = "center"; - cursor = 3; - width = 40; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; - } - (padding 1) - { - type = "button"; - val = " Restore Session"; - on_press.raw = "require('persistence').load()"; - opts = { - keymap = [ - "n" - "s" - ":lua require('persistence').load()" - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "s"; - - position = "center"; - cursor = 3; - width = 40; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; - } - (padding 1) - { - type = "button"; - val = " Quit Neovim"; - on_press.__raw = "function() vim.cmd[[qa]] end"; - opts = { - keymap = [ - "n" - "q" - ":qa" - { - noremap = true; - silent = true; - nowait = true; - } - ]; - shortcut = "q"; - - position = "center"; - cursor = 3; - width = 40; - align_shortcut = "right"; - hl_shortcut = "Keyword"; - }; - } - ]; - }; -} diff --git a/home/nixvim/plugins/ui/bufferline.nix b/home/nixvim/plugins/ui/bufferline.nix deleted file mode 100644 index 99f1529..0000000 --- a/home/nixvim/plugins/ui/bufferline.nix +++ /dev/null @@ -1,172 +0,0 @@ -{ - plugins = { - bufferline = { - enable = true; - settings = { - highlights = { - background = { - bg = "#252434"; - fg = "#605f6f"; - }; - - buffer_selected = { - bg = "#1E1D2D"; - fg = "#D9E0EE"; - }; - buffer_visible = { - fg = "#605f6f"; - bg = "#252434"; - }; - - error = { - fg = "#605f6f"; - bg = "#252434"; - }; - error_diagnostic = { - fg = "#605f6f"; - bg = "#252434"; - }; - - close_button = { - fg = "#605f6f"; - bg = "#252434"; - }; - close_button_visible = { - fg = "#605f6f"; - bg = "#252434"; - }; - fill = { - bg = "#1E1D2D"; - fg = "#605f6f"; - }; - indicator_selected = { - bg = "#1E1D2D"; - fg = "#1E1D2D"; - }; - - modified = { - fg = "#F38BA8"; - bg = "#252434"; - }; - modified_visible = { - fg = "#F38BA8"; - bg = "#252434"; - }; - modified_selected = { - fg = "#ABE9B3"; - bg = "#1E1D2D"; - }; - - separator = { - bg = "#252434"; - fg = "#252434"; - }; - separator_visible = { - bg = "#252434"; - fg = "#252434"; - }; - separator_selected = { - bg = "#252434"; - fg = "#252434"; - }; - - duplicate = { - fg = "NONE"; - bg = "#252434"; - }; - duplicate_selected = { - fg = "#F38BA8"; - bg = "#1E1D2D"; - }; - duplicate_visible = { - fg = "#89B4FA"; - bg = "#252434"; - }; - }; - - options.offsets = [ - { - filetype = "neo-tree"; - text = "Neo-tree"; - highlight = "Directory"; - text_align = "left"; - } - ]; - }; - }; - }; - - keymaps = [ - { - mode = "n"; - key = ""; - action = "BufferLineCycleNext"; - options = { - desc = "Cycle to next buffer"; - }; - } - - { - mode = "n"; - key = ""; - action = "BufferLineCyclePrev"; - options = { - desc = "Cycle to previous buffer"; - }; - } - - { - mode = "n"; - key = ""; - action = ":bp | bd #"; - options = { - desc = "Delete buffer"; - }; - } - - { - mode = "n"; - key = "br"; - action = "BufferLineCloseRight"; - options = { - desc = "Delete buffers to the right"; - }; - } - - { - mode = "n"; - key = "bl"; - action = "BufferLineCloseLeft"; - options = { - desc = "Delete buffers to the left"; - }; - } - - { - mode = "n"; - key = "bo"; - action = "BufferLineCloseOthers"; - options = { - desc = "Delete other buffers"; - }; - } - - { - mode = "n"; - key = "bp"; - action = "BufferLineTogglePin"; - options = { - desc = "Toggle pin"; - }; - } - - { - mode = "n"; - key = "bP"; - action = "BufferLineGroupClose ungrouped"; - options = { - desc = "Delete non-pinned buffers"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/ui/flash.nix b/home/nixvim/plugins/ui/flash.nix deleted file mode 100644 index 6039f5e..0000000 --- a/home/nixvim/plugins/ui/flash.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - plugins.flash = { - enable = true; - settings.label.uppercase = false; - }; - - keymaps = [ - { - mode = [ - "n" - "x" - "o" - ]; - key = "s"; - action = "lua require('flash').jump()"; - options = { - desc = "Flash"; - }; - } - # { - # mode = [ "n" "x" "o" ]; - # key = "S"; - # action = "lua require('flash').treesitter()"; - # options = { - # desc = "Flash Treesitter"; - # }; - # } - { - mode = [ - "x" - "o" - ]; - key = "R"; - action = "lua require('flash').treesitter_search()"; - options = { - desc = "Treesitter Search"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/ui/general.nix b/home/nixvim/plugins/ui/general.nix deleted file mode 100644 index 1db9e45..0000000 --- a/home/nixvim/plugins/ui/general.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - plugins = { - trim.enable = true; - neoscroll.enable = true; - dressing.enable = true; - todo-comments.enable = true; - web-devicons.enable = true; - nui.enable = true; - }; -} diff --git a/home/nixvim/plugins/ui/indent-blankline.nix b/home/nixvim/plugins/ui/indent-blankline.nix deleted file mode 100644 index 4b22a60..0000000 --- a/home/nixvim/plugins/ui/indent-blankline.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - plugins = { - indent-blankline = { - enable = true; - settings = { - indent = { - char = "│"; # "│" or "▎" - tab_char = "│"; - }; - scope.enabled = false; - exclude = { - buftypes = ["terminal" "nofile"]; - filetypes = [ - "help" - "alpha" - "dashboard" - "neo-tree" - "Trouble" - "trouble" - "lazy" - "mason" - "notify" - "toggleterm" - "lazyterm" - ]; - }; - }; - }; - }; -} diff --git a/home/nixvim/plugins/ui/lualine.nix b/home/nixvim/plugins/ui/lualine.nix deleted file mode 100644 index 3c31f7f..0000000 --- a/home/nixvim/plugins/ui/lualine.nix +++ /dev/null @@ -1,129 +0,0 @@ -{ - plugins.lualine = { - enable = true; - settings = { - options = { - always_divide_middle = true; - ignore_focus = ["neo-tree"]; - globalstatus = true; # have a single statusline at bottom of neovim instead of one for every window - disabled_filetypes.statusline = [ - "dashboard" - "alpha" - ]; - section_separators = { - left = ""; - right = ""; - }; - }; - extensions = ["fzf"]; - sections = { - lualine_a = ["mode"]; - lualine_b = ["branch"]; - lualine_y = [ - "progress" - { - separator = ""; - } - "location" - { - padding = { - left = 0; - right = 1; - }; - } - ]; - lualine_z = [''" " .. os.date("%R")'']; - }; - }; - }; - extraConfigLua = '' - local ui = {} - - function ui.fg(name) - local hl = vim.api.nvim_get_hl and vim.api.nvim_get_hl(0, { name = name }) or vim.api.nvim_get_hl_by_name(name, true) - local fg = hl and (hl.fg or hl.foreground) - return fg and { fg = string.format("#%06x", fg) } or nil - end - - ---@param opts? {relative: "cwd"|"root", modified_hl: string?} - function ui.pretty_path(opts) - opts = vim.tbl_extend("force", { - relative = "cwd", - modified_hl = "Constant", - }, opts or {}) - - return function(self) - local path = vim.fn.expand("%:p") --[[@as string]] - - if path == "" then - return "" - end - - local bufname = vim.fn.bufname(vim.fn.bufnr()) - local sep = package.config:sub(1, 1) - - local root = (opts.relative == "root") and vim.fn.getcwd() or vim.fn.fnamemodify(bufname, ":h") - local cwd = vim.fn.getcwd() - - path = (opts.relative == "cwd" and path:find(cwd, 1, true) == 1) and path:sub(#cwd + 2) or path:sub(#root + 2) - - local parts = vim.split(path, "[\\/]") - if #parts > 3 then - parts = { parts[1], "…", parts[#parts - 1], parts[#parts] } - end - - if opts.modified_hl and vim.bo.modified then - local modified_hl_fg = ui.fg(opts.modified_hl) - if modified_hl_fg then - parts[#parts] = string.format("%%#%s#%s%%*", opts.modified_hl, parts[#parts]) - end - end - - return table.concat(parts, sep) - end - end - - require("lualine").setup({ - sections = { - lualine_c = { - { - "diagnostics", - symbols = { - error = " ", - warn = " ", - hint = " ", - info = " ", - }, - }, - { "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } }, - { ui.pretty_path() }, - }, - lualine_x = { - { - function() return require("noice").api.status.command.get() end, - cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end, - color = ui.fg("Statement"), - }, - { - function() return require("noice").api.status.mode.get() end, - cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end, - color = ui.fg("Constant"), - }, - { - function() return " " .. require("dap").status() end, - cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end, - color = ui.fg("Debug"), - }, - { - "diff", - symbols = { - added = " ", - modified = " ", - removed= " ", - }, - }, - } - } - }) - ''; -} diff --git a/home/nixvim/plugins/ui/noice.nix b/home/nixvim/plugins/ui/noice.nix deleted file mode 100644 index 6747f9a..0000000 --- a/home/nixvim/plugins/ui/noice.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - plugins.noice = { - enable = true; - settings = { - lsp = { - override = { - "vim.lsp.util.convert_input_to_markdown_lines" = true; - "vim.lsp.util.stylize_markdown" = true; - "cmp.entry.get_documentation" = true; - }; - progress.enabled = true; - }; - - presets = { - bottom_search = true; - command_palette = true; - long_message_to_split = true; - inc_rename = true; - lsp_doc_border = true; - }; - notify.enabled = true; - - routes = [ - { - filter = { - event = "msg_show"; - any = [ - {find = "%d+L, %d+B";} - {find = "; after #%d+";} - {find = "; before #%d+";} - ]; - }; - view = "mini"; - } - ]; - }; - }; -} diff --git a/home/nixvim/plugins/ui/notify.nix b/home/nixvim/plugins/ui/notify.nix deleted file mode 100644 index 119ac09..0000000 --- a/home/nixvim/plugins/ui/notify.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - plugins.notify = { - enable = true; - # remove animations for preformance - settings = { - stages = "static"; - timeout = 4000; - }; - }; - - keymaps = [ - { - mode = "n"; - key = "un"; - action = '' - lua require("notify").dismiss({ silent = true, pending = true }) - ''; - options = { - desc = "Dismiss All Notifications"; - }; - } - ]; - - extraConfigLua = '' - local notify = require("notify") - - local filtered_message = { "No information available" } - - -- Override notify function to filter out messages - ---@diagnostic disable-next-line: duplicate-set-field - vim.notify = function(message, level, opts) - local merged_opts = vim.tbl_extend("force", { - on_open = function(win) - local buf = vim.api.nvim_win_get_buf(win) - vim.api.nvim_buf_set_option(buf, "filetype", "markdown") - end, - }, opts or {}) - - for _, msg in ipairs(filtered_message) do - if message == msg then - return - end - end - return notify(message, level, merged_opts) - end - ''; -} diff --git a/home/nixvim/plugins/ui/precognition.nix b/home/nixvim/plugins/ui/precognition.nix deleted file mode 100644 index 9070646..0000000 --- a/home/nixvim/plugins/ui/precognition.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - plugins.precognition = { - enable = true; - settings = { - startVisible = false; - }; - }; - - keymaps = [ - { - mode = "n"; - key = "up"; - action.__raw = '' - function() - if require("precognition").toggle() then - vim.notify("Precognition on") - else - vim.notify("Precognition off") - end - end - ''; - - options = { - desc = "Precognition Toggle"; - silent = true; - }; - } - ]; -} diff --git a/home/nixvim/plugins/ui/toggleterm.nix b/home/nixvim/plugins/ui/toggleterm.nix deleted file mode 100644 index 4fef9d7..0000000 --- a/home/nixvim/plugins/ui/toggleterm.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ - plugins.toggleterm = { - enable = true; - settings = { - size = '' - function(term) - if term.direction == "horizontal" then - return 30 - elseif term.direction == "vertical" then - return vim.o.columns * 0.4 - end - end - ''; - open_mapping = "[[]]"; - hide_numbers = true; - shade_terminals = true; - start_in_insert = true; - terminal_mappings = true; - persist_mode = true; - insert_mappings = true; - close_on_exit = true; - shell = "nu"; - direction = "horizontal"; # 'vertical' | 'horizontal' | 'tab' | 'float' - float_opts = { - border = "single"; # 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open - width = 80; - height = 20; - winblend = 0; - }; - }; - }; - - keymaps = [ - { - mode = "t"; - key = ""; - action = "2ToggleTerm"; - options.desc = "Open/Close Terminal 2"; - } - { - mode = "t"; - key = ""; - action = "wincmd h"; - options.desc = "Go to Left window"; - } - { - mode = "t"; - key = ""; - action = "wincmd l"; - options.desc = "Go to Right window"; - } - { - mode = "t"; - key = ""; - action = "wincmd k"; - options.desc = "Go to Up window"; - } - { - mode = "t"; - key = ""; - action = "wincmd j"; - options.desc = "Go to Down window"; - } - ]; -} diff --git a/home/nixvim/plugins/ui/ufo.nix b/home/nixvim/plugins/ui/ufo.nix deleted file mode 100644 index b5a07ae..0000000 --- a/home/nixvim/plugins/ui/ufo.nix +++ /dev/null @@ -1,95 +0,0 @@ -{lib, ...}: { - autoCmd = [ - { - event = [ - "BufEnter" - "BufNew" - ]; - desc = "disable statuscolumn for neo-tree and dashboard"; - callback = lib.nixvim.mkRaw '' - function() - local ft_ignore = { "dashboard", "neo-tree" } - if vim.tbl_contains(ft_ignore, vim.bo.filetype) then - vim.cmd("setlocal foldcolumn=0") - end - end - ''; - } - ]; - - plugins = { - statuscol = { - enable = true; - settings = { - relculright = true; - ft_ignore = [ - "dashboard" - "neo-tree" - ]; - segments = [ - { - click = "v:lua.ScFa"; - text = [(lib.nixvim.mkRaw "require('statuscol.builtin').foldfunc")]; - } - { - click = "v:lua.ScSa"; - text = [" %s"]; - } - { - click = "v:lua.ScLa"; - text = [ - (lib.nixvim.mkRaw "require('statuscol.builtin').lnumfunc") - " " - ]; - } - ]; - }; - }; - - nvim-ufo = { - enable = true; - settings = { - provider_selector = - # lua - '' - function() - return { "lsp", "indent" } - end - ''; - preview.mappings = { - close = "q"; - switch = "K"; - }; - }; - }; - }; - - opts = { - foldcolumn = "1"; - foldlevel = 99; - foldlevelstart = 99; - foldenable = true; - fillchars = lib.nixvim.mkRaw "[[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]"; - }; - - keymaps = [ - { - mode = "n"; - key = "zR"; - action = lib.nixvim.mkRaw "function() require('ufo').openAllFolds() end"; - options.desc = "open all folds"; - } - { - mode = "n"; - key = "zM"; - action = lib.nixvim.mkRaw "function() require('ufo').closeAllFolds() end"; - options.desc = "close all folds"; - } - { - mode = "n"; - key = "zK"; - action = lib.nixvim.mkRaw "function() local winid = require('ufo').peekFoldedLinesUnderCursor() if not winid then vim.lsp.buf.hover() end end"; - options.desc = "Peek Folded Lines"; - } - ]; -} diff --git a/home/nixvim/plugins/util/colorizer.nix b/home/nixvim/plugins/util/colorizer.nix deleted file mode 100644 index 54e88fe..0000000 --- a/home/nixvim/plugins/util/colorizer.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.colorizer = { - enable = true; - }; -} diff --git a/home/nixvim/plugins/util/debugprint.nix b/home/nixvim/plugins/util/debugprint.nix deleted file mode 100644 index ab3ebd0..0000000 --- a/home/nixvim/plugins/util/debugprint.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - plugins.debugprint = { - enable = true; - - settings = { - commands = { - toggle_comment_debug_prints = "ToggleCommentDebugPrints"; - delete_debug_prints = "DeleteDebugPrints"; - }; - - display_counter = true; - display_snippet = true; - - keymaps = { - normal = { - plain_below = "pb"; - plain_above = "pB"; - variable_below = "pv"; - variable_above = "pV"; - variable_below_alwaysprompt.__raw = "nil"; - variable_above_alwaysprompt.__raw = "nil"; - textobj_below = "po"; - textobj_above = "pO"; - toggle_comment_debug_prints.__raw = "nil"; - delete_debug_prints.__raw = "nil"; - }; - visual = { - variable_below = "pv"; - variable_above = "pV"; - }; - }; - }; - }; -} diff --git a/home/nixvim/plugins/util/harpoon.nix b/home/nixvim/plugins/util/harpoon.nix deleted file mode 100644 index 1374899..0000000 --- a/home/nixvim/plugins/util/harpoon.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - plugins.harpoon = { - enable = true; - enableTelescope = true; - # keymapsSilent = true; - # keymaps = { - # addFile = "ha"; - # toggleQuickMenu = ""; - # navFile = { - # "1" = "hj"; - # "2" = "hk"; - # "3" = "hl"; - # "4" = "hm"; - # }; - # }; - }; -} diff --git a/home/nixvim/plugins/util/kulala.nix b/home/nixvim/plugins/util/kulala.nix deleted file mode 100644 index d74a158..0000000 --- a/home/nixvim/plugins/util/kulala.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.kulala = { - enable = false; - }; -} diff --git a/home/nixvim/plugins/util/mini.nix b/home/nixvim/plugins/util/mini.nix deleted file mode 100644 index bf3bfb7..0000000 --- a/home/nixvim/plugins/util/mini.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - plugins = { - mini = { - enable = true; - modules = { - comment = { - options = { - customCommentString = '' - lua require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring - ''; - }; - }; - # Highlight word under cursor - cursorword = { - delay = 0; - }; - - # Show indent lines - indentscope = { - symbol = "│"; - draw.delay = 0; - }; - }; - }; - - ts-context-commentstring.enable = true; - }; -} diff --git a/home/nixvim/plugins/util/nvim-autopairs.nix b/home/nixvim/plugins/util/nvim-autopairs.nix deleted file mode 100644 index b748672..0000000 --- a/home/nixvim/plugins/util/nvim-autopairs.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.nvim-autopairs = { - enable = true; - }; -} diff --git a/home/nixvim/plugins/util/nvim-surround.nix b/home/nixvim/plugins/util/nvim-surround.nix deleted file mode 100644 index b240582..0000000 --- a/home/nixvim/plugins/util/nvim-surround.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.nvim-surround = { - enable = true; - }; -} diff --git a/home/nixvim/plugins/util/persistence.nix b/home/nixvim/plugins/util/persistence.nix deleted file mode 100644 index eb7cde3..0000000 --- a/home/nixvim/plugins/util/persistence.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.persistence = { - enable = true; - }; -} diff --git a/home/nixvim/plugins/util/plenary.nix b/home/nixvim/plugins/util/plenary.nix deleted file mode 100644 index 133b26f..0000000 --- a/home/nixvim/plugins/util/plenary.nix +++ /dev/null @@ -1,5 +0,0 @@ -{pkgs, ...}: { - extraPlugins = with pkgs.vimPlugins; [ - plenary-nvim - ]; -} diff --git a/home/nixvim/plugins/util/project-nvim.nix b/home/nixvim/plugins/util/project-nvim.nix deleted file mode 100644 index b411ec7..0000000 --- a/home/nixvim/plugins/util/project-nvim.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - plugins.project-nvim = { - enable = true; - enableTelescope = true; - }; -} diff --git a/home/nixvim/plugins/util/snacks.nix b/home/nixvim/plugins/util/snacks.nix deleted file mode 100644 index c312f8a..0000000 --- a/home/nixvim/plugins/util/snacks.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - extraConfigLuaPre = lib.mkOrder 1 ( - lib.optionalString - (config.plugins.snacks.enable && config.plugins.snacks.settings.profiler.enabled) # Lua - - '' - if vim.env.PROF then - local snacks = "${pkgs.vimPlugins.snacks-nvim}" - vim.opt.rtp:append(snacks) - require("snacks.profiler").startup({ - startup = { - -- event = "VimEnter", -- stop profiler on this event. Defaults to `VimEnter` - event = "UIEnter", - -- event = "VeryLazy", - }, - }) - end - '' - ); - - plugins = { - snacks = { - enable = true; - - settings = { - bigfile = { - enabled = true; - size = 1024 * 1024; # 1MB - setup.__raw = '' - function(ctx) - ${lib.optionalString config.plugins.indent-blankline.enable ''require("ibl").setup_buffer(0, { enabled = false })''} - ${lib.optionalString (lib.hasAttr "indentscope" config.plugins.mini.modules) ''vim.b.miniindentscope_disable = true''} - ${lib.optionalString config.plugins.illuminate.enable ''require("illuminate").pause_buf()''} - - -- Disable line numbers and relative line numbers - vim.cmd("setlocal nonumber norelativenumber") - - -- Syntax highlighting - vim.schedule(function() - vim.bo[ctx.buf].syntax = ctx.ft - end) - - -- Disable matchparen - vim.cmd("let g:loaded_matchparen = 1") - - -- Disable cursor line and column - vim.cmd("setlocal nocursorline nocursorcolumn") - - -- Disable folding - vim.cmd("setlocal nofoldenable") - - -- Disable sign column - vim.cmd("setlocal signcolumn=no") - - -- Disable swap file and undo file - vim.cmd("setlocal noswapfile noundofile") - - -- Disable mini animate - vim.b.minianimate_disable = true - end - ''; - }; - - gitbrowse.enabled = true; - gitui.enabled = true; - lazygit.enabled = true; - profiler.enabled = true; - }; - }; - }; - - keymaps = [ - { - mode = "n"; - key = "go"; - action = "lua Snacks.gitbrowse()"; - options = { - desc = "Open file in browser"; - }; - } - { - mode = "n"; - key = "gg"; - action = "lua Snacks.lazygit()"; - options = { - desc = "Open lazygit"; - }; - } - { - mode = "n"; - key = "gG"; - action = "lua Snacks.terminal({'gitui'})"; - options = { - desc = "Open Gitui"; - }; - } - ]; -} diff --git a/home/nixvim/plugins/util/wakatime.nix b/home/nixvim/plugins/util/wakatime.nix deleted file mode 100644 index 2ee4576..0000000 --- a/home/nixvim/plugins/util/wakatime.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.wakatime = { - enable = true; - }; -} diff --git a/home/nixvim/settings.nix b/home/nixvim/settings.nix deleted file mode 100644 index 2387e63..0000000 --- a/home/nixvim/settings.nix +++ /dev/null @@ -1,113 +0,0 @@ -{pkgs, ...}: { - config = { - extraConfigLuaPre = '' - vim.fn.sign_define("diagnosticsignerror", { text = " ", texthl = "diagnosticerror", linehl = "", numhl = "" }) - vim.fn.sign_define("diagnosticsignwarn", { text = " ", texthl = "diagnosticwarn", linehl = "", numhl = "" }) - vim.fn.sign_define("diagnosticsignhint", { text = "󰌵", texthl = "diagnostichint", linehl = "", numhl = "" }) - vim.fn.sign_define("diagnosticsigninfo", { text = " ", texthl = "diagnosticinfo", linehl = "", numhl = "" }) - ''; - - # feature that enhances the way Neovim loads and executes Lua modules, - # offering improved performance and flexibility. - luaLoader.enable = true; - clipboard = { - register = "unnamedplus"; - providers.wl-copy = { - enable = true; - package = pkgs.wl-clipboard-rs; - }; - }; - opts = { - virtualedit = "block"; # Allow cursor to move where there is no text in visual block mode - cursorline = true; # Highlight the line where the cursor is located - cmdheight = 2; # more space in the neovim command line for displaying messages - showmode = false; # Dont show the editor mode in status line - - # Enable relative line numbers - number = true; - relativenumber = true; - - # Tab spacing 2 spaces - tabstop = 2; - softtabstop = 2; - shiftwidth = 2; - expandtab = true; - - smartindent = true; - wrap = true; - - # Smart indent on word wrap - breakindent = true; - - # Undo stuff from days ago - swapfile = false; - backup = false; - undofile = true; - - # Incremental search - hlsearch = true; - incsearch = true; - - # Better splitting - splitbelow = true; - splitright = true; - - # Enable ignorecase + smartcase for better searching - ignorecase = true; - smartcase = true; # Don't ignore case with capitals - grepprg = "rg --vimgrep"; - grepformat = "%f:%l:%c:%m"; - - # Better colors - termguicolors = true; - - # Decrease updatetime - updatetime = 50; # faster completion (4000ms default) - - # Enable the sign column to prevent the screen from jumping - signcolumn = "yes"; - - # Reduce which-key timeout to 250s - timeoutlen = 250; - - scrolloff = 8; # Will never have less than 8 characters as you scroll down - mouse = "a"; # Mouse - - # Set encoding type - encoding = "utf-8"; - fileencoding = "utf-8"; - - # Maximum number of items to show in the popup menu (0 means "use available screen space") - pumheight = 0; - }; - - extraConfigLua = '' - local opt = vim.opt - local g = vim.g - local o = vim.o - -- Neovide - if g.neovide then - -- Neovide options - g.neovide_fullscreen = false - g.neovide_hide_mouse_when_typing = false - g.neovide_refresh_rate = 165 - g.neovide_cursor_vfx_mode = "ripple" - g.neovide_cursor_animate_command_line = true - g.neovide_cursor_animate_in_insert_mode = true - g.neovide_cursor_vfx_particle_lifetime = 5.0 - g.neovide_cursor_vfx_particle_density = 14.0 - g.neovide_cursor_vfx_particle_speed = 12.0 - g.neovide_transparency = 0.8 - - -- Neovide Fonts - o.guifont = "MonoLisa Trial:Medium:h15" - -- o.guifont = "CommitMono:Medium:h15" - -- o.guifont = "JetBrainsMono Nerd Font:h14:Medium:i" - -- o.guifont = "FiraMono Nerd Font:Medium:h14" - -- o.guifont = "CaskaydiaCove Nerd Font:h14:b:i" - -- o.guifont = "BlexMono Nerd Font Mono:h14:Medium:i" - -- o.guifont = "Liga SFMono Nerd Font:b:h15" - end - ''; - }; -}