.dotfiles/configs/nvim/lua/lsp-conf.lua

83 lines
2.8 KiB
Lua
Raw Normal View History

2021-11-22 18:45:07 +01:00
local lsp = require "lspconfig"
local lsp_status = require("lsp-status")
2022-03-14 19:21:46 +01:00
local ts_utils = require("nvim-lsp-ts-utils")
2022-01-14 16:14:57 +01:00
2022-04-15 14:52:17 +02:00
require'nvim-lightbulb'.setup {
-- LSP client names to ignore
-- Example: {"sumneko_lua", "null-ls"}
ignore = {},
sign = {
enabled = true,
-- Priority of the gutter sign
priority = 10,
},
float = {
enabled = false,
-- Text to show in the popup float
text = "💡",
-- Available keys for window options:
-- - height of floating window
-- - width of floating window
-- - wrap_at character to wrap at for computing height
-- - max_width maximal width of floating window
-- - max_height maximal height of floating window
-- - pad_left number of columns to pad contents at left
-- - pad_right number of columns to pad contents at right
-- - pad_top number of lines to pad contents at top
-- - pad_bottom number of lines to pad contents at bottom
-- - offset_x x-axis offset of the floating window
-- - offset_y y-axis offset of the floating window
-- - anchor corner of float to place at the cursor (NW, NE, SW, SE)
-- - winblend transparency of the window (0-100)
win_opts = {},
},
virtual_text = {
enabled = false,
-- Text to show at virtual text
text = "💡",
-- highlight mode to use for virtual text (replace, combine, blend), see :help nvim_buf_set_extmark() for reference
hl_mode = "replace",
},
status_text = {
enabled = false,
-- Text to provide when code actions are available
text = "💡",
-- Text to provide when no actions are available
text_unavailable = ""
}
}
2021-09-06 13:29:42 +02:00
local runtime_path = vim.split(package.path, ";")
table.insert(runtime_path, "lua/?.lua")
table.insert(runtime_path, "lua/?/init.lua")
2022-03-14 19:21:46 +01:00
lsp.sumneko_lua.setup {
2022-01-26 20:42:58 +01:00
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = "LuaJIT",
-- Setup your lua path
path = runtime_path
},
diagnostics = {
-- Get the language server to recognize the `vim` global
2022-02-03 12:34:50 +01:00
globals = {"vim"}
2022-01-26 20:42:58 +01:00
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true)
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false
}
}
}
2021-09-06 13:29:42 +02:00
}
2021-11-26 16:40:32 +01:00
-- Ltex Language Server
2022-03-01 23:25:44 +01:00
require("grammar-guard").init()
2022-03-14 19:21:46 +01:00