diff options
| author | Hoang Nguyen <folliekazetani@protonmail.com> | 2023-07-15 00:54:13 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-15 08:54:13 +0800 |
| commit | 5f3167bab9892329d0f9a4205f72b33ee320fec5 (patch) | |
| tree | 11efe00edc61e66d30772bb8d84601a51c8ff837 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-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.lua | 28 |
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, + }, + }, +} |
