mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-11 15:33:18 +00:00
feat(rust): some more comments
This commit is contained in:
parent
6044473226
commit
fc9950a5bf
2 changed files with 2 additions and 0 deletions
|
|
@ -282,6 +282,7 @@ in {
|
||||||
|
|
||||||
(mkIf cfg.extensions.rustaceanvim.enable {
|
(mkIf cfg.extensions.rustaceanvim.enable {
|
||||||
vim = {
|
vim = {
|
||||||
|
# TODO: Determine if mkForce is the best thing here, and if we should consider a warning instead? Or use priority settings.
|
||||||
lsp.servers.rust-analyzer.enable = lib.mkForce false;
|
lsp.servers.rust-analyzer.enable = lib.mkForce false;
|
||||||
lsp.servers.rust-analyzer.root_dir = lib.mkForce null; # let rustaceanvim determine root
|
lsp.servers.rust-analyzer.root_dir = lib.mkForce null; # let rustaceanvim determine root
|
||||||
lsp.servers.rust-analyzer.on_attach = lib.mkForce null; # let rustaceanvim determine attach funcs
|
lsp.servers.rust-analyzer.on_attach = lib.mkForce null; # let rustaceanvim determine attach funcs
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ in {
|
||||||
# https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26.
|
# https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26.
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
# Taken from https://github.com/neovim/nvim-lspconfig/blob/07dff35e7c95288861200b788ef32d6103f107f0/lsp/rust_analyzer.lua
|
||||||
vim.luaConfigRC.rust-util = entryBefore ["lsp-servers"] ''
|
vim.luaConfigRC.rust-util = entryBefore ["lsp-servers"] ''
|
||||||
local function rust_reload_workspace(bufnr)
|
local function rust_reload_workspace(bufnr)
|
||||||
local clients = vim.lsp.get_clients { bufnr = bufnr, name = 'rust-analyzer' }
|
local clients = vim.lsp.get_clients { bufnr = bufnr, name = 'rust-analyzer' }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue