Compare commits
No commits in common. "68c12127c226ea237385d0a9177ae699e165d877" and "ea0a0c68c6ee1ddfe41e004a23b376cad8d62ac1" have entirely different histories.
68c12127c2
...
ea0a0c68c6
@ -8,8 +8,11 @@ return {
|
||||
"mfussenegger/nvim-jdtls",
|
||||
},
|
||||
config = function()
|
||||
local lsp = vim.lsp
|
||||
local enable = vim.lsp.enable
|
||||
-- import lspconfig plugin
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
-- import cmp-nvim-lsp plugin
|
||||
local cmp_nvim_lsp = require("cmp_nvim_lsp")
|
||||
|
||||
local capabilities = require("lsp-options").capabilities
|
||||
local on_attach = require("lsp-options").on_attach
|
||||
@ -24,7 +27,7 @@ return {
|
||||
-- ┌ ┐
|
||||
-- │ Bash │
|
||||
-- └ ┘
|
||||
lsp.config("bashls", {
|
||||
lspconfig.bashls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
@ -32,7 +35,7 @@ return {
|
||||
-- ┌ ┐
|
||||
-- │ C, Cpp, objc │
|
||||
-- └ ┘
|
||||
lsp.config("clangd", {
|
||||
lspconfig.clangd.setup({
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--suggest-missing-includes",
|
||||
@ -46,7 +49,7 @@ return {
|
||||
-- ┌ ┐
|
||||
-- │ Rust │
|
||||
-- └ ┘
|
||||
lsp.config("rust_analyzer", {
|
||||
lspconfig.rust_analyzer.setup({
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
diagnostics = {
|
||||
@ -61,17 +64,17 @@ return {
|
||||
-- ┌ ┐
|
||||
-- │ HTML, CSS, JSON │
|
||||
-- └ ┘
|
||||
lsp.config("cssls", {
|
||||
lspconfig.cssls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lsp.config("html", {
|
||||
lspconfig.html.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
lsp.config("jsonls", {
|
||||
lspconfig.jsonls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
@ -79,7 +82,7 @@ return {
|
||||
-- ┌ ┐
|
||||
-- │ LUA │
|
||||
-- └ ┘
|
||||
lsp.config("lua_ls", {
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
@ -102,7 +105,7 @@ return {
|
||||
-- ┌ ┐
|
||||
-- │ Markdown │
|
||||
-- └ ┘
|
||||
lsp.config("marksman", {
|
||||
lspconfig.marksman.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
@ -110,34 +113,26 @@ return {
|
||||
-- ┌ ┐
|
||||
-- │ Python │
|
||||
-- └ ┘
|
||||
lsp.config("pyright", {
|
||||
lspconfig.pyright.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
})
|
||||
|
||||
-- ┌ ┐
|
||||
-- │ Vue │
|
||||
-- │ Vue, TS, JS, TSX & JSX │
|
||||
-- └ ┘
|
||||
lsp.config("vue_ls", {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
filetypes = {
|
||||
"vue",
|
||||
},
|
||||
})
|
||||
|
||||
-- ┌ ┐
|
||||
-- │ TS, JS, TSX, JSX │
|
||||
-- └ ┘
|
||||
lsp.config("ts_ls", {
|
||||
local mason_packages = vim.fn.stdpath("data") .. "/mason/packages"
|
||||
local volar_path = mason_packages .. "/vue-language-server/node_modules/@vue/language-server"
|
||||
lspconfig.ts_ls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
init_options = {
|
||||
plugins = {
|
||||
{
|
||||
name = "@vue/typescript-plugin",
|
||||
location = "/usr/lib/node_modules/@vue/typescript-plugin",
|
||||
languages = { "javascript", "typescript", "vue" },
|
||||
-- location = "/usr/lib/node_modules/@vue/typescript-plugin",
|
||||
location = volar_path,
|
||||
languages = { "vue" },
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -153,7 +148,7 @@ return {
|
||||
-- ┌ ┐
|
||||
-- │ ASM │
|
||||
-- └ ┘
|
||||
lsp.config("asm_lsp", {
|
||||
lspconfig.asm_lsp.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
@ -161,7 +156,7 @@ return {
|
||||
-- ┌ ┐
|
||||
-- │ LaTeX │
|
||||
-- └ ┘
|
||||
lsp.config("texlab", {
|
||||
lspconfig.texlab.setup({
|
||||
cmd = { "texlab" },
|
||||
filetypes = { "tex", "latex", "bib" },
|
||||
root_dir = function(fname)
|
||||
@ -178,35 +173,18 @@ return {
|
||||
local filename = lspconfutil.path.join(vim.loop.cwd(), fname)
|
||||
return root_pattern(filename) or lspconfutil.path.dirname(filename)
|
||||
end
|
||||
lsp.config("veridian", {
|
||||
lspconfig.veridian.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
root_dir = verilog_root_dir,
|
||||
})
|
||||
|
||||
lsp.config("verible", {
|
||||
lspconfig.verible.setup({
|
||||
-- cmd = { 'verible-verilog-ls', '--rules_config=/home/janis/.config/nvim/util/verible-conf.json' },
|
||||
cmd = { "verible-verilog-ls", "--rules=-no-trailing-spaces", "" },
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
root_dir = verilog_root_dir,
|
||||
})
|
||||
|
||||
-- ╭───────────────────────────────────────────────╮
|
||||
-- │ Enable the configs │
|
||||
-- ╰───────────────────────────────────────────────╯
|
||||
enable("bashls")
|
||||
enable("clangd")
|
||||
enable("rust_analyzer")
|
||||
enable("marksman")
|
||||
enable("vue_ls")
|
||||
enable("ts_ls")
|
||||
enable("texlab")
|
||||
enable("asm_lsp")
|
||||
enable("jsonls")
|
||||
enable("cssls")
|
||||
enable("html")
|
||||
enable("lua_ls")
|
||||
enable("pyright")
|
||||
end,
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ return {
|
||||
mason_lspconfig.setup({
|
||||
-- list of servers for mason to install
|
||||
ensure_installed = {
|
||||
"asm-lsp",
|
||||
-- "bashls",
|
||||
-- "clangd",
|
||||
-- "cssls",
|
||||
|
Loading…
x
Reference in New Issue
Block a user