aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/server_configurations/htmx.lua
diff options
context:
space:
mode:
authorOmar Alkersh <oalkersh@protonmail.com>2023-10-15 21:06:02 -0400
committerGitHub <noreply@github.com>2023-10-16 09:06:02 +0800
commite5425e7a52da2fd6357fc7d5b6afde285fcb8cef (patch)
treecc9091a49863733257157b1135127e28efce63dd /lua/lspconfig/server_configurations/htmx.lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-e5425e7a52da2fd6357fc7d5b6afde285fcb8cef.tar
nvim-lspconfig-e5425e7a52da2fd6357fc7d5b6afde285fcb8cef.tar.gz
nvim-lspconfig-e5425e7a52da2fd6357fc7d5b6afde285fcb8cef.tar.bz2
nvim-lspconfig-e5425e7a52da2fd6357fc7d5b6afde285fcb8cef.tar.lz
nvim-lspconfig-e5425e7a52da2fd6357fc7d5b6afde285fcb8cef.tar.xz
nvim-lspconfig-e5425e7a52da2fd6357fc7d5b6afde285fcb8cef.tar.zst
nvim-lspconfig-e5425e7a52da2fd6357fc7d5b6afde285fcb8cef.zip
feat: add htmx-lsp support (#2863)
* feat: add htmx-lsp support * style: fixing lint issues * fix: calling the binary without the path Assuming the binary is in the user's path * fix: pr reviews Removing extra root dir locations, only using base git dir Setting `single_file_support` option to true * fix: remove unused attribute
Diffstat (limited to 'lua/lspconfig/server_configurations/htmx.lua')
-rw-r--r--lua/lspconfig/server_configurations/htmx.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/htmx.lua b/lua/lspconfig/server_configurations/htmx.lua
new file mode 100644
index 00000000..4c8f8afe
--- /dev/null
+++ b/lua/lspconfig/server_configurations/htmx.lua
@@ -0,0 +1,24 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'htmx-lsp' },
+ filetypes = { 'html' },
+ single_file_support = true,
+ root_dir = function(fname)
+ return util.find_git_ancestor(fname)
+ end,
+ },
+ docs = {
+ description = [[
+https://github.com/ThePrimeagen/htmx-lsp
+
+`htmx-lsp` can be installed via `cargo`:
+```sh
+cargo install htmx-lsp
+```
+
+Lsp is still very much work in progress and experimental. Use at your own risk.
+]],
+ },
+}