Compare commits
No commits in common. "1c8cd809665087a8f9f2b0c7d0226abd8ab2c7a0" and "85a34ff49ffd56ab43a710cf0fe9ff6ea30fd8e6" have entirely different histories.
1c8cd80966
...
85a34ff49f
61
init.lua
61
init.lua
@ -339,9 +339,14 @@ local servers = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
marksman = {},
|
||||||
html = { provideFormatter = false },
|
html = { provideFormatter = false },
|
||||||
cssls = {},
|
cssls = {},
|
||||||
pyright = {},
|
pyright = {},
|
||||||
|
vtsls = {},
|
||||||
|
|
||||||
|
|
||||||
|
texlab = {},
|
||||||
|
|
||||||
jdtls = {
|
jdtls = {
|
||||||
java = {
|
java = {
|
||||||
@ -383,7 +388,6 @@ vim.list_extend(ensure_installed, {
|
|||||||
})
|
})
|
||||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||||
|
|
||||||
|
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
handlers = {
|
handlers = {
|
||||||
function(server_name)
|
function(server_name)
|
||||||
@ -394,50 +398,45 @@ require('mason-lspconfig').setup {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local lspconfig = require("lspconfig")
|
||||||
|
|
||||||
local mason_registry = require('mason-registry')
|
local mason_registry = require('mason-registry')
|
||||||
local vue_language_server_path = mason_registry.get_package('vue-language-server'):get_install_path() ..
|
local vue_language_server_path = mason_registry.get_package('vue-language-server'):get_install_path() ..
|
||||||
'/node_modules/@vue/language-server'
|
'/node_modules/@vue/language-server'
|
||||||
|
|
||||||
local manual_servers = {
|
lspconfig.tsserver.setup {
|
||||||
texlab = {},
|
init_options = {
|
||||||
|
plugins = {
|
||||||
tsserver = {
|
{
|
||||||
init_options = {
|
name = '@vue/typescript-plugin',
|
||||||
plugins = {
|
location = vue_language_server_path,
|
||||||
{
|
languages = { 'vue' },
|
||||||
name = '@vue/typescript-plugin',
|
|
||||||
location = vue_language_server_path,
|
|
||||||
languages = { 'vue' },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
|
||||||
},
|
},
|
||||||
|
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||||
|
}
|
||||||
|
|
||||||
volar = {
|
lspconfig.volar.setup {
|
||||||
init_options = {
|
init_options = {
|
||||||
vue = {
|
vue = {
|
||||||
hybridMode = true,
|
hybridMode = true,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
|
||||||
rust_analyzer = {
|
lspconfig.rust_analyzer.setup {
|
||||||
settings = {
|
capabilities = capabilities,
|
||||||
['rust_analyzer'] = {
|
on_attach = on_attach,
|
||||||
cargo = {
|
settings = {
|
||||||
allFeatures = true,
|
['rust_analyzer'] = {
|
||||||
}
|
cargo = {
|
||||||
|
allFeatures = true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for server_name, config in pairs(manual_servers) do
|
|
||||||
config.capabilities = vim.tbl_deep_extend('force', {}, capabilities, config.capabilities or {})
|
|
||||||
require('lspconfig')[server_name].setup(config)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- this is for my personal config, i cant bother seeing every TJ's default and changing it to my own
|
-- this is for my personal config, i cant bother seeing every TJ's default and changing it to my own
|
||||||
require("jabuxas")
|
require("jabuxas")
|
||||||
|
@ -2,15 +2,5 @@ return {
|
|||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||||
ft = { "markdown" },
|
ft = { "markdown" },
|
||||||
build = function(plugin)
|
build = function() vim.fn["mkdp#util#install"]() end,
|
||||||
if vim.fn.executable "npx" then
|
|
||||||
vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install")
|
|
||||||
else
|
|
||||||
vim.cmd [[Lazy load markdown-preview.nvim]]
|
|
||||||
vim.fn["mkdp#util#install"]()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
init = function()
|
|
||||||
if vim.fn.executable "npx" then vim.g.mkdp_filetypes = { "markdown" } end
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,3 @@ nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Fo
|
|||||||
nmap('<leader>wl', function()
|
nmap('<leader>wl', function()
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
end, '[W]orkspace [L]ist Folders')
|
end, '[W]orkspace [L]ist Folders')
|
||||||
|
|
||||||
vim.keymap.set('c', ';;', function()
|
|
||||||
return vim.fn.getcmdtype() == ':' and vim.fn.expand('%:h') .. '/' or ';;'
|
|
||||||
end, { expr = true })
|
|
||||||
|
Loading…
Reference in New Issue
Block a user