From e5425e7a52da2fd6357fc7d5b6afde285fcb8cef Mon Sep 17 00:00:00 2001 From: Omar Alkersh Date: Sun, 15 Oct 2023 21:06:02 -0400 Subject: 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 --- lua/lspconfig/server_configurations/htmx.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lua/lspconfig/server_configurations/htmx.lua (limited to 'lua') 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. +]], + }, +} -- cgit v1.2.3-70-g09d2