aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorRene Zbinden <rene.zbinden@gmail.com>2023-09-26 05:44:57 +0200
committerGitHub <noreply@github.com>2023-09-25 20:44:57 -0700
commit36e394c9239c6029b864a90b6233069965f04548 (patch)
tree74053513eaa7b7e40514f447fbbb57b68519296a /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-36e394c9239c6029b864a90b6233069965f04548.tar
nvim-lspconfig-36e394c9239c6029b864a90b6233069965f04548.tar.gz
nvim-lspconfig-36e394c9239c6029b864a90b6233069965f04548.tar.bz2
nvim-lspconfig-36e394c9239c6029b864a90b6233069965f04548.tar.lz
nvim-lspconfig-36e394c9239c6029b864a90b6233069965f04548.tar.xz
nvim-lspconfig-36e394c9239c6029b864a90b6233069965f04548.tar.zst
nvim-lspconfig-36e394c9239c6029b864a90b6233069965f04548.zip
feat: add templ support (#2830)
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/templ.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/templ.lua b/lua/lspconfig/server_configurations/templ.lua
new file mode 100644
index 00000000..99a4ada6
--- /dev/null
+++ b/lua/lspconfig/server_configurations/templ.lua
@@ -0,0 +1,21 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'templ', 'lsp' },
+ filetypes = { 'templ' },
+ root_dir = function(fname)
+ return util.root_pattern('go.work', 'go.mod', '.git')(fname)
+ end,
+ },
+ docs = {
+ description = [[
+https://templ.guide
+
+The official language server for the templ HTML templating language.
+]],
+ default_config = {
+ root_dir = [[root_pattern('go.work', 'go.mod', '.git')]],
+ },
+ },
+}