You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get rust-tools to work with AstroVim. So I added 'simrat39/rust-tools.nvim' in my lua/user/plugins/init.lua, however, AstroVim uses nvim-lsp-installer, which needs some customization to work with rust-tools, see simrat39/rust-tools.nvim#89 and https://github.com/williamboman/nvim-lsp-installer/wiki/Rust ... as a lazy person, I simply took the code from the latter (which seems to be the most basic configuration that just works), and wrote a lua/user/lsp/server_registration.lua file which contains (in its current form after some unsuccesful attempts):
returnfunction(server, opts)
-- Integration of rust-tools-- from https://github.com/williamboman/nvim-lsp-installer/wiki/Rustifserver.name=="rust_analyzer" then-- Initialize the LSP via rust-tools insteadrequire("rust-tools").setup {
-- The "server" property provided in rust-tools setup function are the-- settings rust-tools will provide to lspconfig during init. -- -- We merge the necessary settings from nvim-lsp-installer (server:get_default_options())-- with the user's own settings (opts).server=vim.tbl_deep_extend("force", server:get_default_options(), opts),
}
server:attach_buffers()
-- Only if standalone support is neededrequire("rust-tools").start_standalone_if_required()
elseserver:setup(opts)
endend
This, however, does not work. (File is definitely read... writing gibberish into the file leads to errors.)
Any ideas?
The text was updated successfully, but these errors were encountered:
Okay, now I have tried so many different things with rust-tools which all lead to the warning message that "rust-analyzer" has not been found, that I did not notice that my solution above indeed works, except that it still prints this warning message. This, however, seems to be unrelated from AstroVim. Closed again ;)
I didn't even notice that the topic rust-tools is mentioned and managed in the README.md file :O
(A general drawback of highly modular systems: where do you look when there are issues in the interaction of modules.)
Yeah hopefully the new rebranded website and everything will have much clearer documentation and a better resource for "where to look". Looking forward to the nvim 0.7 PR to be finalized!
I'm trying to get
rust-tools
to work with AstroVim. So I added'simrat39/rust-tools.nvim'
in mylua/user/plugins/init.lua
, however, AstroVim usesnvim-lsp-installer
, which needs some customization to work with rust-tools, see simrat39/rust-tools.nvim#89 and https://github.com/williamboman/nvim-lsp-installer/wiki/Rust ... as a lazy person, I simply took the code from the latter (which seems to be the most basic configuration that just works), and wrote alua/user/lsp/server_registration.lua
file which contains (in its current form after some unsuccesful attempts):This, however, does not work. (File is definitely read... writing gibberish into the file leads to errors.)
Any ideas?
The text was updated successfully, but these errors were encountered: