diff options
| author | Leander <80996591+m0ntagur@users.noreply.github.com> | 2022-08-13 00:31:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-13 00:31:07 +0200 |
| commit | 0561e714bb476d936e51f6e49292542712255dec (patch) | |
| tree | 876442c13651dc9946a0fc3c0484b73549fb1540 /nvim/plugin/lspconfig.lua | |
| parent | 83767e5f1d6efa11a1fb5f3e48208b125e0f52d3 (diff) | |
Add files via upload
Diffstat (limited to 'nvim/plugin/lspconfig.lua')
| -rw-r--r-- | nvim/plugin/lspconfig.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/nvim/plugin/lspconfig.lua b/nvim/plugin/lspconfig.lua new file mode 100644 index 0000000..80950e3 --- /dev/null +++ b/nvim/plugin/lspconfig.lua @@ -0,0 +1,38 @@ +local status, lspconfig = pcall(require, 'lspconfig')
+if (not status) then return end
+
+
+
+lspconfig.pyright.setup {}
+
+lspconfig.sumneko_lua.setup {
+ settings = {
+ Lua = {
+ diagnostics = {
+ -- get the language server to recognize the 'vim' globals
+ globals = { 'vim' }
+ },
+
+ workspace = {
+ libary = vim.api.nvim_get_runtime_file("", true)
+ }
+ }
+ }
+}
+
+-- Diagnostic symbols in the sign column (gutter)
+local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
+for type, icon in pairs(signs) do
+ local hl = "DiagnosticSign" .. type
+ vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
+end
+
+vim.diagnostic.config({
+ virtual_text = {
+ prefix = '●'
+ },
+ update_in_insert = true,
+ float = {
+ source = "always", -- Or "if_many"
+ },
+})
|
