python configs i think
parent
f5d1901de7
commit
a9c4046bc2
@ -1,2 +1,15 @@
|
||||
-- yay
|
||||
-- local rustup_home = os.getenv('RUSTUP_HOME') or util.path.join(user_home, '.rustup')
|
||||
local etc = require("etc")
|
||||
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
local rustup_dir = os.getenv('RUSTUP_HOME') or vim.env.HOME .. '.rustup'
|
||||
|
||||
if etc.has_executable("rust-analyzer") then
|
||||
local rust_analyzer = vim.lsp.start({
|
||||
name = 'rust-analyzer',
|
||||
cmd = { 'rust-analyzer' },
|
||||
filetypes = { 'rust' },
|
||||
single_file_support = true,
|
||||
root_dir = vim.fs.root(buf, {'Cargo.toml', '.git'}),
|
||||
})
|
||||
vim.lsp.buf_attach_client(buf, rust_analyzer)
|
||||
end
|
||||
|
Loading…
Reference in New Issue