Updated nvim which forced me to change the lsp config, no longer using

that plugin (which honestly wasn't doing much) and I am now using the
nvim built in perfered way to config the lsps.
This commit is contained in:
Tyler White 2025-10-21 21:26:49 -07:00
parent ca2d6550fa
commit 0a6c51ad4f
2 changed files with 82 additions and 39 deletions

View File

@ -13,7 +13,6 @@ vim.opt.rtp:prepend(lazypath)
require("lazy").setup({ require("lazy").setup({
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
"morhetz/gruvbox", "morhetz/gruvbox",
"neovim/nvim-lspconfig",
{ "nvim-telescope/telescope.nvim", dependencies = {"nvim-lua/plenary.nvim"} }, { "nvim-telescope/telescope.nvim", dependencies = {"nvim-lua/plenary.nvim"} },
"windwp/nvim-autopairs", "windwp/nvim-autopairs",
{"sheerun/vim-polyglot", enabled=false}, {"sheerun/vim-polyglot", enabled=false},
@ -49,7 +48,7 @@ require('nvim-treesitter.configs').setup {
enable = true, enable = true,
}, },
playground = { playground = {
enabled = true, enabled = false,
persist_queries = false, persist_queries = false,
} }
} }
@ -111,8 +110,8 @@ vim.filetype.add({
-- filetype = "odin", -- filetype = "odin",
--} --}
local pipepath = vim.fn.stdpath("cache") .. "/server.pipe" --local pipepath = vim.fn.stdpath("cache") .. "/server.pipe"
if not vim.loop.fs_stat(pipepath) then --if not vim.loop.fs_stat(pipepath) then
vim.fn.serverstart(pipepath) -- vim.fn.serverstart(pipepath)
end --end

View File

@ -37,39 +37,83 @@ local on_attach = function(client, bufnr)
--vim.keymap.set('i', '<A-.>', v:lua.vim.lsp.omnifunc, bufopts) --vim.keymap.set('i', '<A-.>', v:lua.vim.lsp.omnifunc, bufopts)
end end
local lsp_flags = { --local lsp_flags = {
debounce_text_changes = 150, --wtf is this -- debounce_text_changes = 150, --wtf is this
} --}
local lspconfig = require('lspconfig'); --local lspconfig = require('lspconfig');
lspconfig.zls.setup { --lspconfig.zls.setup {
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
--lspconfig.gopls.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
--lspconfig.clangd.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
-- handlers = {
-- ["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
-- end
-- }
--}
--lspconfig.rust_analyzer.setup{
-- on_attach = on_attach,
--}
--lspconfig.ols.setup{
-- on_attach = on_attach,
--}
--lspconfig.pylsp.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
--lspconfig.gdscript.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
local lsps = {
{
"clangd",
{
cmd = {
'clangd',
'--clang-tidy',
},
root_markers = { '.clangd', 'compile_commands.json' },
filetypes = { 'c', 'cpp', 'h' },
on_attach = on_attach, on_attach = on_attach,
flags = lsp_flags, }
} },
lspconfig.gopls.setup{ {
"luals",
{
cmd = {
'lua-language-server',
},
root_markers = { '.git', 'init.lua' },
filetypes = { 'lua' },
on_attach = on_attach, on_attach = on_attach,
flags = lsp_flags, }
} },
lspconfig.clangd.setup{ {
"python-lsp",
{
cmd = {
'pylsp'
},
root_markers = { '.git' },
filetype = { 'py' },
on_attach = on_attach, on_attach = on_attach,
flags = lsp_flags, }
handlers = {
["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
end
} }
} }
lspconfig.rust_analyzer.setup{
on_attach = on_attach, for _, lsp in pairs(lsps) do
} local name, config = lsp[1], lsp[2]
lspconfig.ols.setup{ vim.lsp.enable(name)
on_attach = on_attach, if config then
} vim.lsp.config(name, config)
--lspconfig.pylyzer.setup{} end
lspconfig.pylsp.setup{ end
on_attach = on_attach,
flags = lsp_flags,
}
lspconfig.gdscript.setup{
on_attach = on_attach,
flags = lsp_flags,
}