mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
Rework to get LSPs working, they're working now.
This commit is contained in:
parent
b26b68b1e6
commit
fee237476c
3 changed files with 78 additions and 24 deletions
|
|
@ -1,3 +1,29 @@
|
||||||
-- Autocmds are automatically loaded on the VeryLazy event
|
-- Autocmds are automatically loaded on the VeryLazy event
|
||||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||||
-- Add any additional autocmds here
|
-- Add any additional autocmds here
|
||||||
|
local lsp = require('lsp-zero').preset({})
|
||||||
|
|
||||||
|
lsp.on_attach(function(client, bufnr)
|
||||||
|
lsp.default_keymaps({buffer = bufnr})
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- When you don't have mason.nvim installed
|
||||||
|
-- You'll need to list the servers installed in your system
|
||||||
|
lsp.setup_servers({
|
||||||
|
'tsserver',
|
||||||
|
'eslint',
|
||||||
|
'hls',
|
||||||
|
'pyright',
|
||||||
|
'nil_ls',
|
||||||
|
'volar',
|
||||||
|
'cssls',
|
||||||
|
'html',
|
||||||
|
'jsonls',
|
||||||
|
'diagnosticls',
|
||||||
|
'lua_ls'
|
||||||
|
})
|
||||||
|
|
||||||
|
-- (Optional) Configure lua language server for neovim
|
||||||
|
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
|
||||||
|
|
||||||
|
lsp.setup()
|
||||||
|
|
|
||||||
|
|
@ -14,29 +14,46 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{'williamboman/mason.nvim', enabled = false },
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
---@class PluginLspOpts
|
{
|
||||||
opts = {
|
'VonHeikemen/lsp-zero.nvim',
|
||||||
---@type lspconfig.options
|
branch = 'v2.x',
|
||||||
servers = {
|
dependencies = {
|
||||||
html = {},
|
-- LSP Support
|
||||||
cssls = {},
|
{'neovim/nvim-lspconfig'}, -- Required
|
||||||
jsonls = {},
|
{'williamboman/mason-lspconfig.nvim'}, -- Optional
|
||||||
marksman = {},
|
|
||||||
tsserver = {},
|
|
||||||
tailwindcss = {},
|
|
||||||
volar = {},
|
|
||||||
|
|
||||||
lua_ls = {},
|
-- Autocompletion
|
||||||
|
{'hrsh7th/nvim-cmp'}, -- Required
|
||||||
nil_ls = {},
|
{'hrsh7th/cmp-nvim-lsp'}, -- Required
|
||||||
pyright = {},
|
{'L3MON4D3/LuaSnip'}, -- Required
|
||||||
|
}
|
||||||
--hls = {},
|
}
|
||||||
rust_analyzer = {},
|
|
||||||
diagnosticls = {},
|
-- {
|
||||||
},
|
-- "neovim/nvim-lspconfig",
|
||||||
},
|
-- ---@class PluginLspOpts
|
||||||
},
|
-- opts = {
|
||||||
|
-- ---@type lspconfig.options
|
||||||
|
-- servers = {
|
||||||
|
-- html = {},
|
||||||
|
-- cssls = {},
|
||||||
|
-- jsonls = {},
|
||||||
|
-- marksman = {},
|
||||||
|
-- tsserver = {},
|
||||||
|
-- tailwindcss = {},
|
||||||
|
-- volar = {},
|
||||||
|
--
|
||||||
|
-- lua_ls = {},
|
||||||
|
--
|
||||||
|
-- nil_ls = {},
|
||||||
|
-- pyright = {},
|
||||||
|
--
|
||||||
|
-- --hls = {},
|
||||||
|
-- rust_analyzer = {},
|
||||||
|
-- diagnosticls = {},
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,17 @@
|
||||||
cargo
|
cargo
|
||||||
python3
|
python3
|
||||||
python311Packages.pip
|
python311Packages.pip
|
||||||
|
|
||||||
|
# LSPs
|
||||||
|
nodePackages.vscode-langservers-extracted
|
||||||
|
nodePackages.prettier
|
||||||
|
nodePackages.typescript-language-server
|
||||||
|
nodePackages.diagnostic-languageserver
|
||||||
|
nodePackages.volar
|
||||||
|
nodePackages.pyright
|
||||||
|
haskell-language-server
|
||||||
|
nil
|
||||||
|
sumneko-lua-language-server
|
||||||
];
|
];
|
||||||
|
|
||||||
# PROGRAM CONFIGS
|
# PROGRAM CONFIGS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue