master
blob42 1 year ago
parent 67be596154
commit c52308ede4

@ -171,19 +171,22 @@ local config = {
}
}
},
sumneko_lua = {
before_init=require("neodev.lsp").before_init,
}
-- FIX: deperecated https://github.com/ray-x/navigator.lua/commit/1b2a0856f4adfffc5c4e785a6779c62759c8c926
["neodev"] = {
library = {
enabled = true,
runtime = true,
-- plugins = true,
plugins = {"plenary.nvim"},
-- plugins = {"navigator.lua", "guihua.lua", "go.nvim", "plenary.nvim"},
types = true,
},
setup_jsonls = true,
},
-- ["neodev"] = {
-- library = {
-- enabled = true,
-- runtime = true,
-- -- plugins = true,
-- plugins = {"plenary.nvim"},
-- -- plugins = {"navigator.lua", "guihua.lua", "go.nvim", "plenary.nvim"},
-- types = true,
-- },
-- setup_jsonls = true,
-- },
}
}

@ -0,0 +1,45 @@
local present, neodev = pcall(require, "neodev")
if not present then
return
end
local M = {}
local config = {
library = {
enabled = true, -- when not enabled, neodev will not change any settings to the LSP server
-- these settings will be used for your Neovim config directory
runtime = true, -- runtime path
types = true, -- full signature, docs and completion of vim.api, vim.treesitter, vim.lsp and others
-- plugins = true, -- installed opt or start plugins in packpath
plugins = {"plenary.nvim"},
-- -- plugins = {"navigator.lua", "guihua.lua", "go.nvim", "plenary.nvim"},
-- you can also specify the list of plugins to make available as a workspace library
-- plugins = { "nvim-treesitter", "plenary.nvim", "telescope.nvim" },
},
setup_jsonls = true, -- configures jsonls to provide completion for project specific .luarc.json files
-- for your Neovim config directory, the config.library settings will be used as is
-- for plugin directories (root_dirs having a /lua directory), config.library.plugins will be disabled
-- for any other directory, config.library.enabled will be set to false
-- override = function(root_dir, options) end,
-- NOTE: using navigator I have to include the custom before_init
-- With lspconfig, Neodev will automatically setup your lua-language-server
-- If you disable this, then you have to set {before_init=require("neodev.lsp").before_init}
-- in your lsp start options
lspconfig = true,
-- much faster, but needs a recent built of lua-language-server
-- needs lua-language-server >= 3.6.0
pathStrict = true,
}
M.setup = function()
neodev.setup(config)
end
return M

@ -138,7 +138,7 @@ return {
-- Github Copilot
["github/copilot.vim"] = {
opt = true,
keys = {"<leader>gpt"},
keys = {"<leader>ghp"},
setup= function()
require("core.utils").load_mappings "copilot"
end
@ -551,7 +551,7 @@ return {
-- ------------------
["neovim/nvim-lspconfig"] = { -- {{{
after = { "neodev.nvim", "mason.nvim", "mason-lspconfig.nvim" },
after = {"mason.nvim", "mason-lspconfig.nvim", "neodev.nvim" },
module = { "lspconfig" },
lock = false,
config = function()
@ -586,7 +586,7 @@ return {
lock = false,
opt = true,
module = "navigator",
after = { "nvim-lspconfig", "base46", "ui", "mason.nvim", "mason-lspconfig.nvim", "neodev.nvim" },
after = { "nvim-lspconfig", "base46", "ui", "mason.nvim", "mason-lspconfig.nvim", "neodev.nvim", "null-ls.nvim"},
requires = { "neovim/nvim-lspconfig", "ray-x/guihua.lua", "nvim-treesitter/nvim-treesitter" },
setup = function()
require("core.lazy_load").on_file_open "navigator.lua"
@ -715,6 +715,11 @@ return {
["folke/neodev.nvim"] = {
-- commit = "d6212c1"
-- module = "neodev",
ft = {'lua'},
module = {'neodev'},
config = function()
require('custom.plugins.configs.neodev').setup()
end
},
["hrsh7th/cmp-nvim-lua"] = { -- NOTE: needs to be disabled for neodev
disable = true,

Loading…
Cancel
Save