fix(nvim): make typescript vue work

This commit is contained in:
Michael Thomas 2024-08-08 12:44:38 -04:00
parent 030cbaf9ba
commit fb4a7ee2a3
3 changed files with 26 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
plugins.typescript-tools = {
enable = true;
enable = false;
onAttach = ''
function(client, bufnr)
client.server_capabilities.documentFormattingProvider = false
@ -23,6 +23,9 @@
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayEnumMemberValueHints = true;
};
tsserverPlugins = [
"@vue/typescript-plugin"
];
};
};

View File

@ -1,4 +1,8 @@
{icons, ...}: {
{
pkgs,
icons,
...
}: {
plugins = {
lsp-format = {
enable = false; # Enable it if you want lsp-format integration for none-ls
@ -26,8 +30,8 @@
};
nil-ls = {enable = true;};
tsserver = {
enable = false;
filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact"];
enable = true;
filetypes = ["javascript" "javascriptreact" "typescript" "typescriptreact" "vue"];
extraOptions = {
settings = {
javascript = {
@ -53,10 +57,23 @@
};
};
};
init_options = {
plugins = [
{
name = "@vue/typescript-plugin";
location = "${pkgs.vue-language-server}/lib/node_modules/@vue/language-server";
languages = ["javascript" "typescript" "vue"];
}
];
};
};
};
astro = {enable = true;};
volar = {enable = true;};
volar = {
enable = true;
package = pkgs.vue-language-server;
rootDir = ''require("lspconfig.util").root_pattern("src/App.vue")'';
};
svelte = {enable = true;};
eslint = {enable = true;};
pyright = {enable = true;};

View File

@ -38,6 +38,7 @@
};
prettier = {
enable = true;
disableTsServerFormatter = true;
};
google_java_format = {
enable = true;