diff --git a/flake.lock b/flake.lock index 359f6c1..58fdfef 100644 --- a/flake.lock +++ b/flake.lock @@ -163,6 +163,22 @@ "type": "github" } }, + "nvim-lspfuzzy": { + "flake": false, + "locked": { + "lastModified": 1636365124, + "narHash": "sha256-wZx+tfzkX29vjGg5FFAtNstprzmEKdFOpR4RsIAJarc=", + "owner": "ojroques", + "repo": "nvim-lspfuzzy", + "rev": "d589cd2061830a32bb57bb410f5278afa267d0c6", + "type": "github" + }, + "original": { + "owner": "ojroques", + "repo": "nvim-lspfuzzy", + "type": "github" + } + }, "nvim-ts-autotag": { "flake": false, "locked": { @@ -299,6 +315,7 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nur": "nur", + "nvim-lspfuzzy": "nvim-lspfuzzy", "nvim-ts-autotag": "nvim-ts-autotag", "nvim-ts-context-commentstring": "nvim-ts-context-commentstring", "obelisk": "obelisk", diff --git a/flake.nix b/flake.nix index 54c034c..0f9d8cd 100644 --- a/flake.nix +++ b/flake.nix @@ -44,9 +44,14 @@ flake = false; }; + inputs.nvim-lspfuzzy = { + url = "github:ojroques/nvim-lspfuzzy"; + flake = false; + }; + outputs = { self, nixpkgs, nixos-hardware, flake-utils, home-manager, nur , neovim, obelisk, photoprism-flake, pre-commit-hooks, nvim-ts-autotag - , nvim-ts-context-commentstring }@inputs: + , nvim-ts-context-commentstring, nvim-lspfuzzy }@inputs: let overlays = { # newer packages that support NVIDIA's GBM Wayland backend @@ -75,21 +80,23 @@ }); }; neovim = self: super: - with super.pkgs.vimUtils; { + let + buildVimPlugin = name: input: + super.pkgs.vimUtils.buildVimPluginFrom2Nix { + pname = name; + version = input.rev; + versionSuffix = "-git"; + src = input; + }; + in { neovim-nightly = neovim.packages.${self.system}.neovim; vimPlugins = super.vimPlugins // { - nvim-ts-autotag = buildVimPluginFrom2Nix { - pname = "nvim-ts-autotag"; - version = nvim-ts-autotag.rev; - versionSuffix = "-git"; - src = nvim-ts-autotag; - }; - nvim-ts-context-commentstring = buildVimPluginFrom2Nix { - pname = "nvim-ts-context-commentstring"; - version = nvim-ts-context-commentstring.rev; - versionSuffix = "-git"; - src = nvim-ts-context-commentstring; - }; + nvim-ts-autotag = + buildVimPlugin "nvim-ts-autotag" nvim-ts-autotag; + nvim-ts-context-commentstring = + buildVimPlugin "nvim-ts-context-commentstring" + nvim-ts-context-commentstring; + nvim-lspfuzzy = buildVimPlugin "nvim-lspfuzzy" nvim-lspfuzzy; }; }; deconz = self: super: { diff --git a/home/editors/neovim/default.nix b/home/editors/neovim/default.nix index 05430b4..843369a 100644 --- a/home/editors/neovim/default.nix +++ b/home/editors/neovim/default.nix @@ -46,6 +46,7 @@ in { # lsp nvim-lspconfig nvim-lightbulb + nvim-lspfuzzy # dap nvim-dap diff --git a/home/editors/neovim/lsp/lsp.lua b/home/editors/neovim/lsp/lsp.lua index df153d3..7f0ec06 100644 --- a/home/editors/neovim/lsp/lsp.lua +++ b/home/editors/neovim/lsp/lsp.lua @@ -18,6 +18,8 @@ local diagnosticls_on_attach = function(_, bufnr) "au BufWritePre lua vim.lsp.buf.formatting_seq_sync(nil, nil, { 'tsserver', 'diagnosticls' })") end +require('lspfuzzy').setup {} + -- enable lsp snippets for nvim-compe local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true