Conflicts:
	lua/configs/lspconfig.lua
This commit is contained in:
Michael Peters 2022-10-05 10:03:57 -07:00
commit 800904f1dd
3 changed files with 50 additions and 4 deletions

View File

@ -9,6 +9,7 @@ function M.config()
-- Semantic Colors
local scolors = {
white_fg = '#ced2dc',
gray_fg = '#a6abb2',
tab_visible_bg = '#404040',
tab_bg = '#353535',
@ -74,6 +75,21 @@ function M.config()
bg = scolors.tab_visible_bg,
},
-- de-duplicate text
duplicate = {
fg = scolors.gray_fg,
bg = scolors.tab_bg,
--gui = colors.none,
},
duplicate_visible = {
fg = scolors.gray_fg,
bg = scolors.tab_visible_bg,
},
duplicate_selected = {
fg = scolors.gray_fg,
bg = scolors.tab_visible_bg,
},
-- Diagnostics
error = {
fg = scolors.red,

View File

@ -50,6 +50,7 @@ function M.config()
end
-- Highlight under current selection
-- TODO: this causes a warning
local function lsp_highlight_document(client)
if client.resolved_capabilities.document_highlight then
vim.api.nvim_exec(
@ -87,6 +88,8 @@ function M.config()
local sumneko_root_path = '/home/peters/builds/lua-language-server'
local sumneko_binary = sumneko_root_path.."/bin/lua-language-server"
-- lua-language-server
-- pacman -S lua-language-server
lspconfig.sumneko_lua.setup {
cmd = { sumneko_binary, "-E", sumneko_root_path .. "/main.lua" },
on_attach = on_attach,
@ -113,10 +116,6 @@ function M.config()
},
}
lspconfig.pyright.setup {
on_attach = on_attach,
}
-- TODO: python-language-server (pip install pylsp)
-- lspconfig.pylsp.setup {
-- -- cmd = { '/home/peters/.env38/bin/pylsp' },
@ -132,6 +131,24 @@ function M.config()
-- }
-- }
-- pyright
-- pip install pyright
lspconfig.pyright.setup {
on_attach = on_attach,
}
-- vscode-json-language-server
-- npm i -g vscode-langservers-extracted
lspconfig.jsonls.setup {
on_attach = on_attach,
}
-- typescript-language-server
-- npm i -g typescript-language-server
lspconfig.tsserver.setup {
on_attach = on_attach,
}
end
return M

13
lua/configs/project.lua Normal file
View File

@ -0,0 +1,13 @@
local M = {}
function M.config()
local status_ok, project = pcall(require, "project_nvim")
if not status_ok then
return
end
project.setup {}
end
return M