もっといいものがあれば教えてください
とりあえずこれでやってみている.
デバッガが独立してるのがこれでいいのかがよくわかってない.
~/.vim/userautoload/dein/plugins.toml
[[plugins]]
repo = 'dense-analysis/ale'
hook_add = '''
let g:ale_linters = {
\ 'rust': ['analyzer', 'cargo'],
\ }
let g:ale_fixers = {
\ 'rust': ['rustfmt'],
\ }
let g:ale_rust_analyzer_executable = $HOME . '/.local/share/vim-lsp-settings/servers/rust-analyzer/rust-analyzer'
let g:ale_rust_cargo_use_clippy = 1
'''
[[plugins]]
repo='prabirshrestha/vim-lsp'
hook_add = '''
let g:lsp_settings_filetype_rust = ['rust-analyzer', 'rls']
'''
[[plugins]]
repo='mattn/vim-lsp-settings'
[plugins]]
repo = 'rust-lang/rust.vim'
[[plugins]]
repo = 'puremourning/vimspector'
on_ft = ['rust']
hook_add = '''
nnoremap <Leader>dd :call vimspector#Launch()<CR>
nnoremap <Leader>de :call vimspector#Reset()<CR>
nnoremap <Leader>dc :call vimspector#Continue()<CR>
nnoremap <Leader>dt :call vimspector#ToggleBreakpoint()<CR>
nnoremap <Leader>dT :call vimspector#ClearBreakpoints()<CR>
nmap <Leader>dk <Plug>VimspectorRestart
nmap <Leader>dh <Plug>VimspectorStepOut
nmap <Leader>dl <Plug>VimspectorStepInto
nmap <Leader>dj <Plug>VimspectorStepOver
function! LaunchFileDebug()
call vimspector#LaunchWithSettings({'configuration': &filetype.'_file'})
endfunction
.vimspector.json
{
"configurations": {
"launch": {
"adapter": "CodeLLDB",
"filetypes": [ "rust" ],
"configuration": {
"request": "launch",
"program": "${workspaceRoot}/target/debug/<ファイル名>"
}
}
}
}