aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorHoang Nguyen <folliekazetani@protonmail.com>2023-07-15 00:54:13 +0000
committerGitHub <noreply@github.com>2023-07-15 08:54:13 +0800
commit5f3167bab9892329d0f9a4205f72b33ee320fec5 (patch)
tree11efe00edc61e66d30772bb8d84601a51c8ff837 /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-5f3167bab9892329d0f9a4205f72b33ee320fec5.tar
nvim-lspconfig-5f3167bab9892329d0f9a4205f72b33ee320fec5.tar.gz
nvim-lspconfig-5f3167bab9892329d0f9a4205f72b33ee320fec5.tar.bz2
nvim-lspconfig-5f3167bab9892329d0f9a4205f72b33ee320fec5.tar.lz
nvim-lspconfig-5f3167bab9892329d0f9a4205f72b33ee320fec5.tar.xz
nvim-lspconfig-5f3167bab9892329d0f9a4205f72b33ee320fec5.tar.zst
nvim-lspconfig-5f3167bab9892329d0f9a4205f72b33ee320fec5.zip
feat(regols): add regols support (#2721)
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/regols.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/regols.lua b/lua/lspconfig/server_configurations/regols.lua
new file mode 100644
index 00000000..f872a524
--- /dev/null
+++ b/lua/lspconfig/server_configurations/regols.lua
@@ -0,0 +1,28 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ cmd = { 'regols' },
+ filetypes = { 'rego' },
+ root_dir = function(fname)
+ return util.root_pattern '*.rego'(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/kitagry/regols
+
+OPA Rego language server.
+
+`regols` can be installed by running:
+```sh
+go install github.com/kitagry/regols@latest
+```
+ ]],
+ default_config = {
+ root_dir = [[root_pattern("*.rego", ".git")]],
+ single_file_support = true,
+ },
+ },
+}