From f5ae4bd731da611a8a5aa4e5606dcea7a2f47485 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 6 Jun 2024 21:53:42 +0200 Subject: [PATCH] added lazydev --- lua/plugins/lazydev.lua | 27 +++++++++++++++++++++++++++ lua/plugins/lspconfig.lua | 5 ----- 2 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 lua/plugins/lazydev.lua diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua new file mode 100644 index 0000000..f3a7612 --- /dev/null +++ b/lua/plugins/lazydev.lua @@ -0,0 +1,27 @@ +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, + }, +} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 4ffc71a..2eaa620 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -118,17 +118,12 @@ return { 'williamboman/mason-lspconfig.nvim', 'p00f/clangd_extensions.nvim', 'jose-elias-alvarez/null-ls.nvim', - { - 'folke/neodev.nvim', - }, 'Fildo7525/pretty_hover', }, build = ':MasonUpdate', version = nil, branch = 'master', config = function() - require('neodev').setup({ - }) require('mason').setup({ ui = { border = 'rounded'