diff --git a/flake.lock b/flake.lock index 4b9d2b9..e332e43 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ ] }, "locked": { - "lastModified": 1717408969, - "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", + "lastModified": 1713532798, + "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", "owner": "numtide", "repo": "devshell", - "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", + "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", "type": "github" }, "original": { @@ -36,6 +36,22 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -44,11 +60,11 @@ ] }, "locked": { - "lastModified": 1719877454, - "narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=", + "lastModified": 1715865404, + "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4e3583423212f9303aa1a6337f8dffb415920e4f", + "rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9", "type": "github" }, "original": { @@ -57,6 +73,21 @@ "type": "github" } }, + "flake-root": { + "locked": { + "lastModified": 1713493429, + "narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=", + "owner": "srid", + "repo": "flake-root", + "rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "flake-root", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -75,41 +106,11 @@ "type": "github" } }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "nixvim", - "flake-compat" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ], - "nixpkgs-stable": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1719259945, - "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ "nixvim", - "git-hooks", + "pre-commit-hooks", "nixpkgs" ] }, @@ -135,11 +136,11 @@ ] }, "locked": { - "lastModified": 1719827439, - "narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=", + "lastModified": 1716457508, + "narHash": "sha256-ZxzffLuWRyuMrkVVq7wastNUqeO0HJL9xqfY1QsYaqo=", "owner": "nix-community", "repo": "home-manager", - "rev": "59ce796b2563e19821361abbe2067c3bb4143a7d", + "rev": "850cb322046ef1a268449cf1ceda5fd24d930b05", "type": "github" }, "original": { @@ -156,11 +157,11 @@ ] }, "locked": { - "lastModified": 1719845423, - "narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=", + "lastModified": 1716511055, + "narHash": "sha256-5Fe/DGgvMhPEMl9VdVxv3zvwRcwNDmW5eRJ0gk72w7U=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "ec12b88104d6c117871fad55e931addac4626756", + "rev": "0bea8222f6e83247dd13b055d83e64bce02ee532", "type": "github" }, "original": { @@ -193,11 +194,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720542800, - "narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=", + "lastModified": 1716509168, + "narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "feb2849fdeb70028c70d73b848214b00d324a497", + "rev": "bfb7a882678e518398ce9a31a881538679f6f092", "type": "github" }, "original": { @@ -212,20 +213,21 @@ "devshell": "devshell", "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "git-hooks": "git-hooks", + "flake-root": "flake-root", "home-manager": "home-manager", "nix-darwin": "nix-darwin", "nixpkgs": [ "nixpkgs" ], + "pre-commit-hooks": "pre-commit-hooks", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1720864742, - "narHash": "sha256-NVkF91eZPav7zbcMR+7mUzOdMKgIEBJSwtFU2rv1OpY=", + "lastModified": 1716759197, + "narHash": "sha256-I4r9krPVUl1b70VbC8j8xDQ2mDBoGCx8tH9CExiJMd8=", "owner": "nix-community", "repo": "nixvim", - "rev": "195978e6272702ea5d6e9b837d083c411dc5d688", + "rev": "ba293d36403c39c22dbb9a928f9af4d0df54b79f", "type": "github" }, "original": { @@ -266,6 +268,33 @@ "type": "gitlab" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_2", + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1716213921, + "narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "root": { "inputs": { "nix-formatter-pack": "nix-formatter-pack", @@ -296,11 +325,11 @@ ] }, "locked": { - "lastModified": 1719887753, - "narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=", + "lastModified": 1715940852, + "narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c", + "rev": "2fba33a182602b9d49f0b2440513e5ee091d838b", "type": "github" }, "original": { diff --git a/plugins/arrow.nix b/plugins/arrow.nix deleted file mode 100644 index 6e7401c..0000000 --- a/plugins/arrow.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ icons, pkgs, ... }: -{ - opts.enable = true; - - extra = { - packages = [ pkgs.vimPlugins.arrow-nvim ]; - - config = '' - require('arrow').setup({ - show_icons = true, - leader_key = ';', -- Recommended to be a single key - buffer_leader_key = 'm', -- Per Buffer Mappings - }) - ''; - }; -} diff --git a/plugins/comment.nix b/plugins/comment.nix index d9b9608..44a327e 100644 --- a/plugins/comment.nix +++ b/plugins/comment.nix @@ -7,19 +7,4 @@ _: enable = true; settings.pre_hook = "require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook()"; }; - - keymaps = [ - { - key = "/"; - action = "(comment_toggle_linewise_current)"; - options.desc = "Toggle comment line"; - mode = "n"; - } - { - key = "/"; - action = "(comment_toggle_linewise_visual)"; - options.desc = "Toggle comment line"; - mode = "v"; - } - ]; } diff --git a/plugins/guess-indent.nix b/plugins/guess-indent.nix index d1e19bf..63b70dc 100644 --- a/plugins/guess-indent.nix +++ b/plugins/guess-indent.nix @@ -8,7 +8,7 @@ # https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/configs/guess-indent.lua config = '' require("guess-indent").setup({}) - vim.cmd.lua { args = { "require('guess-indent').set_from_buffer()" }, mods = { silent = true } } + vim.cmd.lua { args = { "require('guess-indent').set_from_buffer('auto_cmd')" }, mods = { silent = true } } ''; }; } diff --git a/plugins/lsp.nix b/plugins/lsp.nix index 1c8b15f..ebea72f 100644 --- a/plugins/lsp.nix +++ b/plugins/lsp.nix @@ -32,26 +32,7 @@ action = "code_action"; desc = "LSP code action"; }; - "lr" = { - action = "rename"; - desc = "Rename current symbol"; - }; - "lR" = { - action = "rename"; - desc = "Search references"; - }; - "lh" = { - action = "signature_help"; - desc = "Signature help"; - }; - "lG" = { - action = "workspace_symbol"; - desc = "Search workspace symbols"; - }; - "gK" = { - action = "signature_help"; - desc = "Signature help"; - }; + gd = { action = "definition"; desc = "Go to definition"; @@ -99,25 +80,25 @@ # Load all servers definitions servers = { + ansiblels.enable = true; bashls.enable = true; cssls.enable = true; docker-compose-language-service.enable = true; dockerls.enable = true; + eslint.enable = true; + gopls.enable = true; helm-ls.enable = true; html.enable = true; + java-language-server.enable = true; jsonls.enable = true; lua-ls.enable = true; nginx-language-server.enable = true; nixd.enable = true; pyright.enable = true; + sqls.enable = true; + terraformls.enable = true; + tsserver.enable = true; yamlls.enable = true; - clangd.enable = true; - marksman.enable = true; - texlab.enable = true; - - java-language-server.enable = false; - zls.enable = false; - rust-analyzer.enable = false; typos-lsp = { enable = true; diff --git a/plugins/luasnip.nix b/plugins/luasnip.nix index 613d852..4701491 100644 --- a/plugins/luasnip.nix +++ b/plugins/luasnip.nix @@ -1,9 +1,3 @@ _:{ - opts = { - enable = true; - - fromLua = [ - { paths = "~/.config/snippets/"; } - ]; - }; + opts.enable = true; } diff --git a/plugins/oil.nix b/plugins/oil.nix index fdb0f46..f7ed885 100644 --- a/plugins/oil.nix +++ b/plugins/oil.nix @@ -1,18 +1,3 @@ _: { opts.enable = true; - - keymaps = [ - { - key = "O"; - action = "function() require('oil').toggle_float() end"; - options.desc = "Toggle oil floating window"; - mode = "n"; - } - { - key = "to"; - action = "function() require('oil').toggle_float() end"; - options.desc = "Toggle oil floating window"; - mode = "n"; - } - ]; } diff --git a/plugins/otter.nix b/plugins/otter.nix deleted file mode 100644 index 4701491..0000000 --- a/plugins/otter.nix +++ /dev/null @@ -1,3 +0,0 @@ -_:{ - opts.enable = true; -} diff --git a/plugins/telescope.nix b/plugins/telescope.nix index d15a11b..faa4d37 100644 --- a/plugins/telescope.nix +++ b/plugins/telescope.nix @@ -36,15 +36,15 @@ # │ └────────────────────────────────────────┘ │ # └──────────────────────────────────────────────────┘ extraConfigLuaPre = '' - local telescopeWithArgs = function(fn, args, extension) + local TelescopeWithTheme = function(fn, args, extension) args.layout_config = { anchor = "N", mirror = true, width = 0.8, } - + if fn == "keymaps" or fn == "registers" then args.layout_config.height = function(_, _, max_lines) return max_lines end end - + local args_with_theme = require("telescope.themes").get_dropdown(args) if extension ~= "" then @@ -55,7 +55,7 @@ end ''; - # Use root keymaps to allow usage of custom telescopeWithArgs function + # Use root keymaps to allow usage of custom TelescopeWithTheme function keymaps = let mkTelescopeKeymap = @@ -68,7 +68,7 @@ }: { inherit key mode; - action.__raw = "function() telescopeWithArgs('${fn}', ${helpers.toLuaObject args}, '${builtins.toString extension}') end"; + action.__raw = "function() TelescopeWithTheme('${fn}', ${helpers.toLuaObject args}, '${builtins.toString extension}') end"; options = { inherit desc; }; }; in @@ -108,7 +108,7 @@ fn = "live_grep"; } { - desc = "Find help"; + desc = "Find help tags"; key = "fh"; fn = "help_tags"; } @@ -129,33 +129,14 @@ } { desc = "Find word under cursor"; - key = "f*"; + key = "fw"; fn = "grep_string"; } { desc = "Search references"; - key = "lR"; + key = "gr"; fn = "lsp_references"; } - { - desc = "Find marks"; - key = "f'"; - fn = "marks"; - } - { - desc = "Find commands"; - key = "fC"; - fn = "commands"; - } - { - desc = "Find themes"; - key = "ft"; - fn = "colortheme"; - args = { - enable_preview = true; - ignore_builtins = true; - }; - } ]; }; } diff --git a/plugins/treesitter.nix b/plugins/treesitter.nix index d88603b..ddb4fc5 100644 --- a/plugins/treesitter.nix +++ b/plugins/treesitter.nix @@ -8,12 +8,12 @@ enable = true; # Enable treesitter based indentation (use '=' to auto-indent) - settings.indent.enable = true; + indent = true; # Workaround to enable incremental selection without setting default keymaps (keymaps are set globally) # This is needed in order to set custom descriptions and avoid to have multiple keymaps # See https://github.com/nix-community/nixvim/issues/1506 - settings.incremental_selection = { + moduleConfig.incremental_selection = { enable = true; keymaps = lib.mkForce { }; };