mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat!(nvim): Migrate to v0.11 built-in lsp configs
This commit is contained in:
parent
4da1667c54
commit
9315c6e55d
16 changed files with 303 additions and 31 deletions
|
|
@ -1,14 +1,31 @@
|
|||
local nvim_version = vim.version()
|
||||
|
||||
|
||||
if nvim_version.minor ~= 11 then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_lines = true,
|
||||
})
|
||||
|
||||
vim.lsp.enable({
|
||||
"clangd",
|
||||
"luals",
|
||||
})
|
||||
-- vim.lsp.enable({
|
||||
-- "clangd",
|
||||
-- "luals",
|
||||
-- })
|
||||
|
||||
local lsp_configs = {}
|
||||
for _, v in ipairs(vim.api.nvim_get_runtime_file('lsp/*', true)) do
|
||||
local name = vim.fn.fnamemodify(v, ':t:r')
|
||||
lsp_configs[name] = true
|
||||
end
|
||||
|
||||
vim.lsp.enable(vim.tbl_keys(lsp_configs))
|
||||
|
||||
-- Delete 0.11 new gr- keymaps
|
||||
vim.keymap.del({ "n" }, "grn")
|
||||
vim.keymap.del({ "n", "x" }, "gra")
|
||||
vim.keymap.del({ "n" }, "gri")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
{ import = "plugins.mod.nvim-lspconfig" },
|
||||
-- { import = "plugins.mod.nvim-lspconfig" },
|
||||
{
|
||||
"lervag/vimtex",
|
||||
ft = { "tex", "bib" },
|
||||
|
|
@ -27,18 +27,18 @@ return {
|
|||
-- ensure_installed = require("config.servers").servers,
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
event = "BufReadPre",
|
||||
dependencies = {
|
||||
{ "williamboman/mason.nvim" },
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
},
|
||||
opts = {
|
||||
-- ensure_installed = require("config.servers").servers,
|
||||
-- automatic_installation = false,
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- "williamboman/mason-lspconfig.nvim",
|
||||
-- event = "BufReadPre",
|
||||
-- dependencies = {
|
||||
-- { "williamboman/mason.nvim" },
|
||||
-- { "neovim/nvim-lspconfig" },
|
||||
-- },
|
||||
-- opts = {
|
||||
-- -- ensure_installed = require("config.servers").servers,
|
||||
-- -- automatic_installation = false,
|
||||
-- },
|
||||
-- },
|
||||
{ import = "plugins.mod.conform-nvim" },
|
||||
{ "nvim-treesitter/nvim-treesitter-context", lazy = true },
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,11 +38,3 @@ return {
|
|||
end
|
||||
end,
|
||||
|
||||
-- example calling setup directly for each LSP
|
||||
-- config = function()
|
||||
-- local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
-- local lspconfig = require('lspconfig')
|
||||
--
|
||||
-- lspconfig['lua_ls'].setup({ capabilities = capabilities })
|
||||
-- end
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue