Compare commits
2 Commits
85a34ff49f
...
1c8cd80966
Author | SHA1 | Date | |
---|---|---|---|
1c8cd80966 | |||
58bbe7790c |
33
init.lua
33
init.lua
@ -339,14 +339,9 @@ local servers = {
|
||||
}
|
||||
},
|
||||
},
|
||||
marksman = {},
|
||||
html = { provideFormatter = false },
|
||||
cssls = {},
|
||||
pyright = {},
|
||||
vtsls = {},
|
||||
|
||||
|
||||
texlab = {},
|
||||
|
||||
jdtls = {
|
||||
java = {
|
||||
@ -388,6 +383,7 @@ vim.list_extend(ensure_installed, {
|
||||
})
|
||||
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
|
||||
|
||||
|
||||
require('mason-lspconfig').setup {
|
||||
handlers = {
|
||||
function(server_name)
|
||||
@ -398,15 +394,14 @@ require('mason-lspconfig').setup {
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
|
||||
local mason_registry = require('mason-registry')
|
||||
local vue_language_server_path = mason_registry.get_package('vue-language-server'):get_install_path() ..
|
||||
'/node_modules/@vue/language-server'
|
||||
|
||||
lspconfig.tsserver.setup {
|
||||
local manual_servers = {
|
||||
texlab = {},
|
||||
|
||||
tsserver = {
|
||||
init_options = {
|
||||
plugins = {
|
||||
{
|
||||
@ -417,19 +412,18 @@ lspconfig.tsserver.setup {
|
||||
},
|
||||
},
|
||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||
}
|
||||
},
|
||||
|
||||
lspconfig.volar.setup {
|
||||
volar = {
|
||||
init_options = {
|
||||
vue = {
|
||||
hybridMode = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
lspconfig.rust_analyzer.setup {
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
},
|
||||
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
['rust_analyzer'] = {
|
||||
cargo = {
|
||||
@ -437,6 +431,13 @@ lspconfig.rust_analyzer.setup {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
require("jabuxas")
|
||||
|
@ -2,5 +2,15 @@ return {
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
ft = { "markdown" },
|
||||
build = function() vim.fn["mkdp#util#install"]() end,
|
||||
build = function(plugin)
|
||||
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,3 +91,7 @@ nmap('<leader>wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Fo
|
||||
nmap('<leader>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_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