Compare commits
No commits in common. "b4ee9d0b8ac3ac6f142c10f83b759cd9cb6a1ea4" and "de6026cb84a9b514cacfcdf335b78eb72e126230" have entirely different histories.
b4ee9d0b8a
...
de6026cb84
1 changed files with 18 additions and 44 deletions
|
|
@ -4,14 +4,17 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
keymaps.lspBuf."<leader>ca" = "code_action";
|
keymaps.lspBuf."<leader>ca" = "code_action";
|
||||||
luaConfig.post = ''
|
luaConfig.post = ''
|
||||||
vim.diagnostic.config({
|
local signs = {
|
||||||
signs = {
|
|
||||||
Error = "",
|
Error = "",
|
||||||
Warn = "",
|
Warn = "",
|
||||||
Hint = "",
|
Hint = "",
|
||||||
Info = ""
|
Info = ""
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
for type, icon in pairs(signs) do
|
||||||
|
local hl = "DiagnosticSign" .. type
|
||||||
|
vim.fn.sign_define(hl, {text = icon, texthl = hl, numhl = hl})
|
||||||
|
end
|
||||||
'';
|
'';
|
||||||
servers = {
|
servers = {
|
||||||
cssls.enable = true;
|
cssls.enable = true;
|
||||||
|
|
@ -19,6 +22,7 @@
|
||||||
jdtls.enable = true;
|
jdtls.enable = true;
|
||||||
nil_ls.enable = true;
|
nil_ls.enable = true;
|
||||||
pyright.enable = true;
|
pyright.enable = true;
|
||||||
|
ts_ls.enable = true;
|
||||||
rust_analyzer = {
|
rust_analyzer = {
|
||||||
enable = true;
|
enable = true;
|
||||||
installCargo = false;
|
installCargo = false;
|
||||||
|
|
@ -27,44 +31,14 @@
|
||||||
svelte.enable = true;
|
svelte.enable = true;
|
||||||
volar = {
|
volar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraOptions.on_init.__raw = ''
|
tslsIntegration = true;
|
||||||
function(client)
|
# extraOptions.init_options.vue.hybridMode = false;
|
||||||
client.handlers['tsserver/request'] = function(_, result, context)
|
|
||||||
local clients = vim.lsp.get_clients({ bufnr = context.bufnr, name = 'vtsls' })
|
|
||||||
if #clients == 0 then
|
|
||||||
vim.notify('Could not found `vtsls` lsp client, vue_lsp would not work without it.', vim.log.levels.ERROR)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local ts_client = clients[1]
|
|
||||||
|
|
||||||
local param = unpack(result)
|
|
||||||
local id, command, payload = unpack(param)
|
|
||||||
ts_client:exec_cmd({
|
|
||||||
command = 'typescript.tsserverRequest',
|
|
||||||
arguments = {
|
|
||||||
command,
|
|
||||||
payload,
|
|
||||||
},
|
|
||||||
}, { bufnr = context.bufnr }, function(_, r)
|
|
||||||
local response_data = { { id, r.body } }
|
|
||||||
---@diagnostic disable-next-line: param-type-mismatch
|
|
||||||
client:notify('tsserver/response', response_data)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
typescript-tools = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
filetypes = [ "javascript" "typescript" "vue" ];
|
|
||||||
settings = {
|
|
||||||
single_file_support = false;
|
|
||||||
tsserver_plugins = [ "@vue/typescript-plugin" ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# nvim-jdtls = {
|
||||||
|
# enable = true;
|
||||||
|
# data = "~/.cache/jdtls/workspace";
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue