diff options
Diffstat (limited to 'lua/plugins')
| -rw-r--r-- | lua/plugins/lsp.lua | 46 | ||||
| -rw-r--r-- | lua/plugins/navigator.lua | 5 | ||||
| -rw-r--r-- | lua/plugins/note.lua | 9 | ||||
| -rw-r--r-- | lua/plugins/rustowl.lua | 4 |
4 files changed, 42 insertions, 22 deletions
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index eae804e..c7f6d52 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,25 +1,43 @@ return { - "neovim/nvim-lspconfig", - dependencies = { + -- Native LSP configuration for Neovim 0.11+ + { "nvimtools/none-ls.nvim", - { - "williamboman/mason.nvim", - opts = { - ui = { - border = "rounded", - }, + event = "VeryLazy", + }, + { + "williamboman/mason.nvim", + opts = { + ui = { + border = "rounded", }, }, + event = "VeryLazy", + }, + { "folke/neodev.nvim", + dependencies = { + "neovim/nvim-lspconfig", -- Required by neodev for lspconfig.util + }, + event = "VeryLazy", + }, + { "williamboman/mason-lspconfig.nvim", + event = "VeryLazy", + }, + { "WhoIsSethDaniel/mason-tool-installer.nvim", + event = "VeryLazy", }, - event = "VeryLazy", - main = "pi.lsp", - opts = { - mason = { - enable = true, - auto_install = false, + { + name = "native-lsp", + dir = vim.fn.stdpath("config"), + event = "VeryLazy", + main = "pi.lsp", + opts = { + mason = { + enable = true, + auto_install = false, + }, }, }, } diff --git a/lua/plugins/navigator.lua b/lua/plugins/navigator.lua index 53a7735..bc72469 100644 --- a/lua/plugins/navigator.lua +++ b/lua/plugins/navigator.lua @@ -9,14 +9,11 @@ return { event = "LspAttach", dependencies = { { "ray-x/guihua.lua", build = "cd lua/fzy && make" }, - { - "neovim/nvim-lspconfig", - }, }, opts = { default_mapping = false, lsp = { - disable_lsp = "all", + disable_lsp = "all", -- Uses native LSP configuration instead of lspconfig hover = { enable = false, }, diff --git a/lua/plugins/note.lua b/lua/plugins/note.lua index 2728bde..e2b5db3 100644 --- a/lua/plugins/note.lua +++ b/lua/plugins/note.lua @@ -19,9 +19,12 @@ return { -- Using the parent .git folder as the cwd cwd = function() local bufPath = vim.api.nvim_buf_get_name(0) - local cwd = require("lspconfig").util.root_pattern(".git")(bufPath) - - return cwd + -- Use native vim.fs.find instead of lspconfig.util + local cwd = vim.fs.find(".git", { + path = bufPath, + upward = true, + })[1] + return cwd and vim.fs.dirname(cwd) or vim.fn.getcwd() end, }, }, diff --git a/lua/plugins/rustowl.lua b/lua/plugins/rustowl.lua index b85ec08..34a66a6 100644 --- a/lua/plugins/rustowl.lua +++ b/lua/plugins/rustowl.lua @@ -1,5 +1,7 @@ return { "cordx56/rustowl", ft = { "rust" }, - dependencies = { "neovim/nvim-lspconfig" }, + opts = { + client = {}, -- Uses native vim.lsp.start internally + }, } |