Skip to content

Commit

Permalink
feat(volar): lsp for volar vue lsp
Browse files Browse the repository at this point in the history
  • Loading branch information
kesor committed Jan 6, 2024
1 parent 1b2ca8d commit 75e7bfd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ Below is a list of supported language servers for configuration with `nvim-lspco
- [terraformls](#terraformls)
- [tsserver](#tsserver)
- [vuels](#vuels)
- [volar](#volar)
- [yamlls](#yamlls)

### bashls
Expand Down Expand Up @@ -482,7 +483,7 @@ require'lspconfig'.tailwindcss.setup {
params.processId = vim.NIL
end,
cmd = require'lspcontainers'.command('tailwindcss'),
filetypes = { "django-html", "htmldjango", "gohtml", "html", "markdown", "php", "css", "postcss", "sass", "scss", "stylus", "javascript", "javascriptreact", "rescript", "typescript", "typescriptreact", "vue", "svelte" },
filetypes = { "django-html", "htmldjango", "gohtml", "html", "markdown", "php", "css", "postcss", "sass", "scss", "stylus", "javascript", "javascriptreact", "rescript", "typescript", "typescriptreact", "vue", "volar", "svelte" },
root_dir = require'lspconfig/util'.root_pattern("tailwind.config.js", "tailwind.config.ts", "postcss.config.js", "postcss.config.ts", "package.json", "node_modules", ".git", vim.fn.getcwd()),
...
}
Expand Down Expand Up @@ -545,6 +546,21 @@ require'lspconfig'.vuels.setup {
}
```

### volar

https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#volar

```lua
require'lspconfig'.volar.setup {
before_init = function(params)
params.processId = vim.NIL
end,
cmd = require'lspcontainers'.command('volar'),
root_dir = require'lspconfig/util'.root_pattern(".git", vim.fn.getcwd()),
...
}
```

---

To contribute to LSPs, please see the [lspcontainers/dockerfiles](https://github.com/lspcontainers/dockerfiles) repository.
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ local function setup_languages()
"terraformls",
"tsserver",
"vuels",
"volar",
"yamlls"
}

Expand Down
1 change: 1 addition & 0 deletions lua/lspcontainers/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ local supported_languages = {
terraformls = { image = "docker.io/lspcontainers/terraform-ls" },
tsserver = { image = "docker.io/lspcontainers/typescript-language-server" },
vuels = { image = "docker.io/lspcontainers/vue-language-server" },
volar = { image = "docker.io/lspcontainers/volar" },
yamlls = { image = "docker.io/lspcontainers/yaml-language-server" },
}

Expand Down

0 comments on commit 75e7bfd

Please sign in to comment.