2023-07-21 20:19:38 +00:00
|
|
|
local lsp = require('lsp-zero').preset({})
|
|
|
|
|
|
|
|
lsp.on_attach(function(client, bufnr)
|
|
|
|
lsp.default_keymaps({buffer = bufnr})
|
|
|
|
end)
|
|
|
|
|
|
|
|
-- Language servers
|
|
|
|
lsp.ensure_installed({
|
|
|
|
-- Replace these with whatever servers you want to install
|
|
|
|
'bashls',
|
2023-07-22 12:00:46 +00:00
|
|
|
--'clangd',
|
2023-07-21 20:19:38 +00:00
|
|
|
'julials',
|
2023-07-22 12:00:46 +00:00
|
|
|
--'lua_ls',
|
2023-07-27 11:38:05 +00:00
|
|
|
--'ltex',
|
2023-07-21 20:19:38 +00:00
|
|
|
'pylsp',
|
2023-07-22 12:00:46 +00:00
|
|
|
--'texlab',
|
|
|
|
--'zls'
|
2023-07-21 20:19:38 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
--[[
|
|
|
|
START LANGUAGE SERVERS CONFIG HERE!!!
|
|
|
|
]]--
|
|
|
|
|
|
|
|
-- (Optional) Configure lua language server for neovim
|
|
|
|
|
2023-07-22 12:00:46 +00:00
|
|
|
require('lspconfig').bashls.setup({})
|
2023-07-21 20:19:38 +00:00
|
|
|
|
2023-07-22 12:00:46 +00:00
|
|
|
require('lspconfig').clangd.setup({})
|
|
|
|
|
|
|
|
--require('lspconfig').gopls.setup({
|
|
|
|
-- on_attach = on_attach,
|
|
|
|
--})
|
|
|
|
|
2023-07-27 12:06:46 +00:00
|
|
|
require('lspconfig').julials.setup({})
|
2023-07-21 08:46:34 +00:00
|
|
|
|
2023-07-27 09:52:58 +00:00
|
|
|
require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
|
2023-07-21 08:46:34 +00:00
|
|
|
|
2023-07-27 09:52:58 +00:00
|
|
|
|
|
|
|
require('lspconfig').texlab.setup({})
|
|
|
|
|
|
|
|
local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt"
|
|
|
|
local words = {}
|
|
|
|
|
|
|
|
for word in io.open(path, "r"):lines() do
|
|
|
|
table.insert(words, word)
|
|
|
|
end
|
|
|
|
|
|
|
|
require('lspconfig').ltex.setup({
|
|
|
|
settings = {
|
|
|
|
ltex = {
|
|
|
|
language = "en-GB",
|
|
|
|
dictionary = {
|
|
|
|
["en-GB"] = words,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
2023-07-21 20:19:38 +00:00
|
|
|
|
|
|
|
-- source: https://rust-analyzer.github.io/manual.html#nvim-lsp
|
|
|
|
--require('lspconfig').rust_analyzer.setup({
|
|
|
|
-- on_attach = on_attach,
|
|
|
|
-- settings = {
|
|
|
|
-- ["rust-analyzer"] = {
|
|
|
|
-- inlayHints = {
|
|
|
|
-- closingBraceHints = true, -- Whether to show inlay hints after a closing } to indicate what item it belongs to.
|
|
|
|
-- }
|
|
|
|
-- }
|
|
|
|
-- }
|
|
|
|
--})
|
|
|
|
|
2023-07-22 12:00:46 +00:00
|
|
|
require('lspconfig').texlab.setup({})
|
|
|
|
|
|
|
|
require('lspconfig').zls.setup({})
|
|
|
|
|
2023-07-21 20:19:38 +00:00
|
|
|
--[[
|
|
|
|
END LANGUAGE SERVERS CONFIG HERE!!!
|
|
|
|
]]--
|
|
|
|
|
|
|
|
lsp.setup()
|