aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorNils Wireklint <stagnation@users.noreply.github.com>2022-12-06 02:43:10 +0100
committerGitHub <noreply@github.com>2022-12-06 09:43:10 +0800
commit4f289effd944a8297bf86de2a7a5aa8f59870df9 (patch)
treee665165fdaaa263dbc7dbb4d33e083d9aed9228b /lua
parentfix: restart client after client is stopped after LspRestart (#2290) (diff)
downloadnvim-lspconfig-4f289effd944a8297bf86de2a7a5aa8f59870df9.tar
nvim-lspconfig-4f289effd944a8297bf86de2a7a5aa8f59870df9.tar.gz
nvim-lspconfig-4f289effd944a8297bf86de2a7a5aa8f59870df9.tar.bz2
nvim-lspconfig-4f289effd944a8297bf86de2a7a5aa8f59870df9.tar.lz
nvim-lspconfig-4f289effd944a8297bf86de2a7a5aa8f59870df9.tar.xz
nvim-lspconfig-4f289effd944a8297bf86de2a7a5aa8f59870df9.tar.zst
nvim-lspconfig-4f289effd944a8297bf86de2a7a5aa8f59870df9.zip
feat: add 'starlark-rust' LSP for starlark and BUILD files (#2291)
* feat: add 'starlark-rust' LSP for starlark and BUILD files This uses the github name and not the cargo name as it is not so official and may be replaced by a better LSP. So the name is not already taken by this linter. * fix: remove indent * fix: remove indent * fix: remove indent * fix: remove indent * fix: remove indent * fix: remove indent * fix: remove indent Co-authored-by: Raphael <glephunter@gmail.com>
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/starlark-rust.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/starlark-rust.lua b/lua/lspconfig/server_configurations/starlark-rust.lua
new file mode 100644
index 00000000..36b828f1
--- /dev/null
+++ b/lua/lspconfig/server_configurations/starlark-rust.lua
@@ -0,0 +1,20 @@
+local util = require 'lspconfig/util'
+
+return {
+ default_config = {
+ cmd = { 'starlark', '--lsp' },
+ filetypes = { 'star', 'bzl', 'BUILD.bazel' },
+ root_dir = util.find_git_ancestor,
+ },
+ docs = {
+ description = [[
+https://github.com/facebookexperimental/starlark-rust/
+The LSP part of `starlark-rust` is not currently documented,
+ but the implementation works well for linting.
+This gives valuable warnings for potential issues in the code,
+but does not support refactorings.
+
+It can be installed with cargo: https://crates.io/crates/starlark
+]],
+ },
+}