aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnish De <63192115+AnishDe12020@users.noreply.github.com>2022-05-06 18:41:41 +0530
committerGitHub <noreply@github.com>2022-05-06 15:11:41 +0200
commitca244c62adfd5bfc150c727ec0ab910f74c107df (patch)
tree3fc01013867be2c888fccb75293a00dcd286c095
parentrun autogen_metadata.lua (diff)
downloadmason-ca244c62adfd5bfc150c727ec0ab910f74c107df.tar
mason-ca244c62adfd5bfc150c727ec0ab910f74c107df.tar.gz
mason-ca244c62adfd5bfc150c727ec0ab910f74c107df.tar.bz2
mason-ca244c62adfd5bfc150c727ec0ab910f74c107df.tar.lz
mason-ca244c62adfd5bfc150c727ec0ab910f74c107df.tar.xz
mason-ca244c62adfd5bfc150c727ec0ab910f74c107df.tar.zst
mason-ca244c62adfd5bfc150c727ec0ab910f74c107df.zip
Added the Astro Language Server (#677)
-rw-r--r--README.md6
-rw-r--r--lua/nvim-lsp-installer/_generated/filetype_map.lua2
-rw-r--r--lua/nvim-lsp-installer/_generated/metadata.lua3
-rw-r--r--lua/nvim-lsp-installer/_generated/schemas/astro.lua3
-rw-r--r--lua/nvim-lsp-installer/servers/astro/init.lua16
-rw-r--r--lua/nvim-lsp-installer/servers/init.lua1
6 files changed, 29 insertions, 2 deletions
diff --git a/README.md b/README.md
index e60889f8..a6e314bc 100644
--- a/README.md
+++ b/README.md
@@ -103,9 +103,10 @@ Important if you use packer.nvim! (click to expand)
> Do not separate the nvim-lsp-installer setup from lspconfig, for example via the `config` hook.
> Make sure to colocate the nvim-lsp-installer setup with the lspconfig setup. This is because load order of plugins is
-not guaranteed, leading to nvim-lsp-installer's `config` function potentially executing after lspconfig's.
+> not guaranteed, leading to nvim-lsp-installer's `config` function potentially executing after lspconfig's.
>
> ❌ Do not do this:
+
```lua
use {
{
@@ -123,7 +124,9 @@ use {
},
}
```
+
> ✅ Instead, do this:
+
```lua
use {
"williamboman/nvim-lsp-installer",
@@ -182,6 +185,7 @@ require("nvim-lsp-installer").setup({
| Ansible | `ansiblels` |
| Arduino [(docs!!!)][arduino] | `arduino_language_server` |
| Assembly (GAS/NASM, GO) | `asm_lsp` |
+| Astro | `astro` |
| AsyncAPI | `spectral` |
| Bash | `bashls` |
| Beancount | `beancount` |
diff --git a/lua/nvim-lsp-installer/_generated/filetype_map.lua b/lua/nvim-lsp-installer/_generated/filetype_map.lua
index c7904f04..45707ee1 100644
--- a/lua/nvim-lsp-installer/_generated/filetype_map.lua
+++ b/lua/nvim-lsp-installer/_generated/filetype_map.lua
@@ -5,7 +5,7 @@ return {
arduino = { "arduino_language_server" },
asm = { "asm_lsp" },
aspnetcorerazor = { "tailwindcss" },
- astro = { "tailwindcss" },
+ astro = { "astro", "tailwindcss" },
["astro-markdown"] = { "tailwindcss" },
awk = { "awk_ls" },
beancount = { "beancount" },
diff --git a/lua/nvim-lsp-installer/_generated/metadata.lua b/lua/nvim-lsp-installer/_generated/metadata.lua
index 7f4809d3..7ab7dcf9 100644
--- a/lua/nvim-lsp-installer/_generated/metadata.lua
+++ b/lua/nvim-lsp-installer/_generated/metadata.lua
@@ -13,6 +13,9 @@ return {
asm_lsp = {
filetypes = { "asm", "vmasm" }
},
+ astro = {
+ filetypes = { "astro" }
+ },
awk_ls = {
filetypes = { "awk" }
},
diff --git a/lua/nvim-lsp-installer/_generated/schemas/astro.lua b/lua/nvim-lsp-installer/_generated/schemas/astro.lua
new file mode 100644
index 00000000..bc486f51
--- /dev/null
+++ b/lua/nvim-lsp-installer/_generated/schemas/astro.lua
@@ -0,0 +1,3 @@
+-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY.
+-- stylua: ignore start
+return {properties = {["astro.css.completions.emmet"] = {default = true,description = "Enable Emmet completions for CSS",title = "CSS: Emmet Completions",type = "boolean"},["astro.css.completions.enabled"] = {default = true,description = "Enable completions for CSS",title = "CSS: Completions",type = "boolean"},["astro.css.documentColors.enabled"] = {default = true,description = "Enable color picker for CSS",title = "CSS: Document Colors",type = "boolean"},["astro.css.documentSymbols.enabled"] = {default = true,description = "Enable document symbols for CSS",title = "CSS: Symbols in Outline",type = "boolean"},["astro.css.enabled"] = {default = true,description = "Enable CSS features",title = "CSS",type = "boolean"},["astro.css.hover.enabled"] = {default = true,description = "Enable hover info for CSS",title = "CSS: Hover Info",type = "boolean"},["astro.html.completions.emmet"] = {default = true,description = "Enable Emmet completions for HTML",title = "HTML: Emmet Completions",type = "boolean"},["astro.html.completions.enabled"] = {default = true,description = "Enable completions for HTML",title = "HTML: Completions",type = "boolean"},["astro.html.documentSymbols.enabled"] = {default = true,description = "Enable document symbols for CSS",title = "HTML: Symbols in Outline",type = "boolean"},["astro.html.enabled"] = {default = true,description = "Enable HTML features",title = "HTML",type = "boolean"},["astro.html.hover.enabled"] = {default = true,description = "Enable hover info for HTML",title = "HTML: Hover Info",type = "boolean"},["astro.html.tagComplete.enabled"] = {default = true,description = "Enable tag completion for HTML",title = "HTML: Tag Completion",type = "boolean"},["astro.trace.server"] = {default = "off",description = "Traces the communication between VS Code and the language server.",enum = { "off", "messages", "verbose" },scope = "window",type = "string"},["astro.typescript.codeActions.enabled"] = {default = true,description = "Enable code actions for TypeScript",title = "TypeScript: Code Actions",type = "boolean"},["astro.typescript.completions.enabled"] = {default = true,description = "Enable completions for TypeScript",title = "TypeScript: Completions",type = "boolean"},["astro.typescript.definitions.enabled"] = {default = true,description = "Enable go to definition for TypeScript",title = "TypeScript: Go to Definition",type = "boolean"},["astro.typescript.diagnostics.enabled"] = {default = true,description = "Enable diagnostic messages for TypeScript",title = "TypeScript: Diagnostics",type = "boolean"},["astro.typescript.documentSymbols.enabled"] = {default = true,description = "Enable document symbols for TypeScript",title = "TypeScript: Symbols in Outline",type = "boolean"},["astro.typescript.enabled"] = {default = true,description = "Enable TypeScript features",title = "TypeScript",type = "boolean"},["astro.typescript.hover.enabled"] = {default = true,description = "Enable hover info for TypeScript",title = "TypeScript: Hover Info",type = "boolean"},["astro.typescript.rename.enabled"] = {default = true,description = "Enable rename functionality for JS/TS variables inside Astro files",title = "TypeScript: Rename",type = "boolean"},["astro.typescript.semanticTokens.enabled"] = {default = true,description = "Enable semantic tokens (used for semantic highlighting) for TypeScript.",title = "TypeScript: Semantic Tokens",type = "boolean"},["astro.typescript.signatureHelp.enabled"] = {default = true,description = "Enable signature help (parameter hints) for TypeScript",title = "TypeScript: Signature Help",type = "boolean"}},title = "Astro configuration",type = "object"} \ No newline at end of file
diff --git a/lua/nvim-lsp-installer/servers/astro/init.lua b/lua/nvim-lsp-installer/servers/astro/init.lua
new file mode 100644
index 00000000..6dfc445e
--- /dev/null
+++ b/lua/nvim-lsp-installer/servers/astro/init.lua
@@ -0,0 +1,16 @@
+local server = require "nvim-lsp-installer.server"
+local npm = require "nvim-lsp-installer.core.managers.npm"
+
+return function(name, root_dir)
+ return server.Server:new {
+ name = name,
+ root_dir = root_dir,
+ languages = { "astro" },
+ homepage = "https://github.com/withastro/language-tools/tree/main/packages/language-server",
+ installer = npm.packages { "@astrojs/language-server" },
+ async = true,
+ default_options = {
+ cmd_env = npm.env(root_dir),
+ },
+ }
+end
diff --git a/lua/nvim-lsp-installer/servers/init.lua b/lua/nvim-lsp-installer/servers/init.lua
index 07de468d..6a14c376 100644
--- a/lua/nvim-lsp-installer/servers/init.lua
+++ b/lua/nvim-lsp-installer/servers/init.lua
@@ -36,6 +36,7 @@ local CORE_SERVERS = Data.set_of {
"ansiblels",
"arduino_language_server",
"asm_lsp",
+ "astro",
"awk_ls",
"bashls",
"beancount",