From 0daaf4add5730feb6afaaf8980c30b39fe407883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Kmie=C4=87?= Date: Thu, 6 Jun 2024 22:51:44 +0200 Subject: [PATCH] Nvim: replace neodev with lazydev --- .config/nvim/lua/plugins/lazydev.lua | 25 +++++++++++++++++++++++++ .config/nvim/lua/plugins/lspconfig.lua | 4 ---- 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 .config/nvim/lua/plugins/lazydev.lua diff --git a/.config/nvim/lua/plugins/lazydev.lua b/.config/nvim/lua/plugins/lazydev.lua new file mode 100644 index 0000000..1e83c38 --- /dev/null +++ b/.config/nvim/lua/plugins/lazydev.lua @@ -0,0 +1,25 @@ +return { + { + "folke/lazydev.nvim", + ft = "lua", -- only load on lua files + opts = { + library = { + -- See the configuration section for more details + -- Load luvit types when the `vim.uv` word is found + { path = "luvit-meta/library", words = { "vim%.uv" } }, + }, + }, + }, + { "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings + { -- optional completion source for require statements and module annotations + "hrsh7th/nvim-cmp", + opts = function(_, opts) + opts.sources = opts.sources or {} + table.insert(opts.sources, { + name = "lazydev", + group_index = 0, -- set group index to 0 to skip loading LuaLS completions + }) + end, + }, + -- { "folke/neodev.nvim", enabled = false }, -- make sure to uninstall or disable neodev.nvim +} diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index 51c3600..fbd9cbc 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -5,13 +5,9 @@ return { -- "SmiteshP/nvim-navbuddy", "jubnzv/virtual-types.nvim", --"ray-x/lsp_signature.nvim", - "folke/neodev.nvim", {url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"}, }, config = function() - require("neodev").setup({ - library = { plugins = { "nvim-dap-ui" }, types = true }, - }) local nvim_lsp = require('lspconfig') require('clangd_extensions').setup({ inlay_hints = {