aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorKeith Smiley <keithbsmiley@gmail.com>2024-06-27 23:41:23 -0700
committerGitHub <noreply@github.com>2024-06-28 14:41:23 +0800
commit96e7247df2b3b647e27114541930e5365041e744 (patch)
tree5b7d4fc8df5b0766a95962407bdeae91a08c20cf /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-96e7247df2b3b647e27114541930e5365041e744.tar
nvim-lspconfig-96e7247df2b3b647e27114541930e5365041e744.tar.gz
nvim-lspconfig-96e7247df2b3b647e27114541930e5365041e744.tar.bz2
nvim-lspconfig-96e7247df2b3b647e27114541930e5365041e744.tar.lz
nvim-lspconfig-96e7247df2b3b647e27114541930e5365041e744.tar.xz
nvim-lspconfig-96e7247df2b3b647e27114541930e5365041e744.tar.zst
nvim-lspconfig-96e7247df2b3b647e27114541930e5365041e744.zip
feat: add bazelrc-lsp config (#3224)
This is the configuration for https://github.com/salesforce-misc/bazelrc-lsp, which supports `.bazelrc` configuration files.
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/bazelrc-lsp.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/bazelrc-lsp.lua b/lua/lspconfig/server_configurations/bazelrc-lsp.lua
new file mode 100644
index 00000000..d89462a2
--- /dev/null
+++ b/lua/lspconfig/server_configurations/bazelrc-lsp.lua
@@ -0,0 +1,26 @@
+local util = require 'lspconfig/util'
+
+return {
+ default_config = {
+ cmd = { 'bazelrc-lsp' },
+ filetypes = { 'bazelrc' },
+ root_dir = util.root_pattern('WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel'),
+ },
+ docs = {
+ description = [[
+https://github.com/salesforce-misc/bazelrc-lsp
+
+`bazelrc-lsp` is a LSP for `.bazelrc` configuration files.
+
+The `.bazelrc` file type is not detected automatically, you can register it manually (see below) or override the filetypes:
+
+```lua
+vim.filetype.add {
+ pattern = {
+ ['.*.bazelrc'] = 'bazelrc',
+ },
+}
+```
+]],
+ },
+}