Add rustaceanvim
parent
5eaef52367
commit
005ea997ba
42
init.lua
42
init.lua
|
@ -258,7 +258,7 @@ end
|
||||||
|
|
||||||
-- Bootstrap plugin system
|
-- Bootstrap plugin system
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.uv.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
|
@ -518,7 +518,6 @@ require('lazy').setup({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end},
|
end},
|
||||||
-- TODO rustacean-vim
|
|
||||||
{'mfussenegger/nvim-jdtls', dependencies = {'neovim/nvim-lspconfig'}, config = function()
|
{'mfussenegger/nvim-jdtls', dependencies = {'neovim/nvim-lspconfig'}, config = function()
|
||||||
au('FileType', {
|
au('FileType', {
|
||||||
pattern = 'java',
|
pattern = 'java',
|
||||||
|
@ -578,12 +577,46 @@ require('lazy').setup({
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
end},
|
end},
|
||||||
|
{'mrcjkb/rustaceanvim', config = function ()
|
||||||
|
vim.g.rustaceanvim = {
|
||||||
|
server = {
|
||||||
|
default_settings = {
|
||||||
|
['rust-analyzer'] = {
|
||||||
|
cargo = {
|
||||||
|
-- Load OUT_DIR when running check on save, needed for proc macros
|
||||||
|
loadOutDirsFromCheck = true,
|
||||||
|
},
|
||||||
|
checkOnSave = true,
|
||||||
|
-- Error checking settings
|
||||||
|
check = {
|
||||||
|
-- Use clippy for error checking
|
||||||
|
command = "clippy",
|
||||||
|
-- Also run checks for tests
|
||||||
|
allTargets = true,
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
-- Disable diagnostics with false positives
|
||||||
|
disabled = {'unresolved-import'},
|
||||||
|
},
|
||||||
|
procMacro = {
|
||||||
|
-- Enable proc macro support
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
rustfmt = {
|
||||||
|
extraArgs = { '+nightly' }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end},
|
||||||
{'pmizio/typescript-tools.nvim', opts = {
|
{'pmizio/typescript-tools.nvim', opts = {
|
||||||
settings = {
|
settings = {
|
||||||
tsserve_file_preferences = {
|
tsserve_file_preferences = {
|
||||||
quotePreference = 'single'
|
quotePreference = 'single'
|
||||||
},
|
},
|
||||||
tsserver_plugins = (function ()
|
tsserver_plugins = (function ()
|
||||||
|
if fn.has('nvim-0.10') == 0 then return end
|
||||||
if vim.system({'npm', 'list', '-g', '@styled/typescript-styled-plugin'}):wait().code == 0 then
|
if vim.system({'npm', 'list', '-g', '@styled/typescript-styled-plugin'}):wait().code == 0 then
|
||||||
return {'@styled/typescript-styled-plugin'}
|
return {'@styled/typescript-styled-plugin'}
|
||||||
else
|
else
|
||||||
|
@ -715,7 +748,7 @@ require('lazy').setup({
|
||||||
executable = {
|
executable = {
|
||||||
--command = mason_path('codelldb') .. '/extension/adapter/codelldb',
|
--command = mason_path('codelldb') .. '/extension/adapter/codelldb',
|
||||||
--args = {'--liblldb', mason_path('codelldb') .. '/extension/lldb/lib/liblldb.so', '--port', '${port}'},
|
--args = {'--liblldb', mason_path('codelldb') .. '/extension/lldb/lib/liblldb.so', '--port', '${port}'},
|
||||||
command = 'lldb',
|
command = 'codelldb',
|
||||||
args = {'--port', '${port}'},
|
args = {'--port', '${port}'},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1074,11 +1107,12 @@ require('lazy').setup({
|
||||||
require'telescope'.load_extension('dap')
|
require'telescope'.load_extension('dap')
|
||||||
require'telescope'.load_extension('undo')
|
require'telescope'.load_extension('undo')
|
||||||
end},
|
end},
|
||||||
{'nvim-neotest/neotest', dependencies = {'rcasia/neotest-java', 'nvim-neotest/neotest-vim-test'}, config = function()
|
{'nvim-neotest/neotest', dependencies = {'rcasia/neotest-java', 'nvim-neotest/neotest-vim-test', 'rouge8/neotest-rust'}, config = function()
|
||||||
require'neotest'.setup {
|
require'neotest'.setup {
|
||||||
adapters = {
|
adapters = {
|
||||||
require'neotest-java' {},
|
require'neotest-java' {},
|
||||||
require'neotest-vim-test' {},
|
require'neotest-vim-test' {},
|
||||||
|
require'neotest-rust' {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end},
|
end},
|
||||||
|
|
Loading…
Reference in New Issue