Skip to content

Commit

Permalink
add support for rust-analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
csmoe committed Nov 21, 2019
1 parent 2c6f8db commit a577dce
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/nvim_lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require 'nvim_lsp/gopls'
require 'nvim_lsp/hie'
require 'nvim_lsp/pyls'
require 'nvim_lsp/rls'
require 'nvim_lsp/rust-analyzer'
require 'nvim_lsp/solargraph'
require 'nvim_lsp/texlab'
require 'nvim_lsp/tsserver'
Expand Down
27 changes: 27 additions & 0 deletions lua/nvim_lsp/rust_analyzer.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
local skeleton = require 'nvim_lsp/skeleton'
local util = require 'nvim_lsp/util'
local lsp = vim.lsp

skeleton.rust_analyzer = {
default_config = {
cmd = {"ra_lsp_server"};
filetypes = {"rust"};
root_dir = util.root_pattern("Cargo.toml");
log_level = lsp.protocol.MessageType.Warning;
settings = {};
};
docs = {
description = [[
https://github.com/rust-analyzer/rust-analyzer
rust-analyzer(aka rls 2.0), a language server for Rust
See below for rls specific settings.
https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/user#settings
]];
default_config = {
root_dir = [[root_pattern("Cargo.toml")]];
};
};
};
-- vim:et ts=2 sw=2

0 comments on commit a577dce

Please sign in to comment.