Skip to content

Commit

Permalink
feat: add bazelrc-lsp config (#3224)
Browse files Browse the repository at this point in the history
This is the configuration for
https://github.com/salesforce-misc/bazelrc-lsp, which supports
`.bazelrc` configuration files.
  • Loading branch information
keith authored Jun 28, 2024
1 parent 1d2454f commit 96e7247
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions lua/lspconfig/server_configurations/bazelrc-lsp.lua
Original file line number Diff line number Diff line change
@@ -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',
},
}
```
]],
},
}

0 comments on commit 96e7247

Please sign in to comment.