Latest config with deubgger
This commit is contained in:
parent
9c3c62fa98
commit
80a176b9b5
|
@ -4,8 +4,8 @@ filetype indent on
|
||||||
let mapleader="½"
|
let mapleader="½"
|
||||||
|
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
set clipboard=unnamed
|
" set clipboard=unnamed
|
||||||
set clipboard+=unnamedplus
|
" set clipboard+=unnamedplus
|
||||||
set smartindent
|
set smartindent
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
|
@ -23,6 +23,7 @@ set foldlevelstart=20
|
||||||
set number
|
set number
|
||||||
set relativenumber
|
set relativenumber
|
||||||
|
|
||||||
|
let g:ale_disable_lsp = 1
|
||||||
"Plugins
|
"Plugins
|
||||||
call plug#begin('~/.local/share/nvim/plugged')
|
call plug#begin('~/.local/share/nvim/plugged')
|
||||||
|
|
||||||
|
@ -42,7 +43,7 @@ Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
let g:coc_global_extensioons = [
|
let g:coc_global_extensioons = [
|
||||||
\ 'coc-tsserver',
|
\ 'coc-tsserver',
|
||||||
\ 'coc-json',
|
\ 'coc-json',
|
||||||
\ 'coc-python',
|
\ 'coc-pyright',
|
||||||
\ 'coc-snippets',
|
\ 'coc-snippets',
|
||||||
\ 'coc-prettier',
|
\ 'coc-prettier',
|
||||||
\ 'coc-eslint'
|
\ 'coc-eslint'
|
||||||
|
@ -50,12 +51,14 @@ let g:coc_global_extensioons = [
|
||||||
|
|
||||||
" File handling
|
" File handling
|
||||||
Plug 'preservim/nerdtree'
|
Plug 'preservim/nerdtree'
|
||||||
|
Plug 'mcchrish/nnn.vim'
|
||||||
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||||
Plug 'junegunn/fzf.vim'
|
Plug 'junegunn/fzf.vim'
|
||||||
|
|
||||||
" Python
|
" Python
|
||||||
Plug 'w0rp/ale'
|
Plug 'w0rp/ale'
|
||||||
Plug 'numirias/semshi', {'do': ':UpdateRemotePlugins'}
|
Plug 'mfussenegger/nvim-dap-python'
|
||||||
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
||||||
|
|
||||||
" HTML
|
" HTML
|
||||||
Plug 'jonsmithers/vim-html-template-literals'
|
Plug 'jonsmithers/vim-html-template-literals'
|
||||||
|
@ -71,12 +74,17 @@ Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
|
||||||
" Testing
|
" Testing
|
||||||
Plug 'janko/vim-test'
|
Plug 'janko/vim-test'
|
||||||
|
|
||||||
|
" Debugging
|
||||||
|
Plug 'mfussenegger/nvim-dap'
|
||||||
|
Plug 'rcarriga/nvim-dap-ui'
|
||||||
|
|
||||||
" Editing
|
" Editing
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
Plug 'pseewald/vim-anyfold'
|
Plug 'pseewald/vim-anyfold'
|
||||||
|
|
||||||
" Git
|
" Git
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
|
Plug 'tpope/vim-fugitive'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
" Colorscheme and Theming
|
" Colorscheme and Theming
|
||||||
|
@ -89,6 +97,7 @@ endif
|
||||||
let g:airline#extensions#tabline#enabled = 0
|
let g:airline#extensions#tabline#enabled = 0
|
||||||
let g:airline_theme='nord'
|
let g:airline_theme='nord'
|
||||||
let g:airline_symbols.maxlinenr = ''
|
let g:airline_symbols.maxlinenr = ''
|
||||||
|
let g:airline_symbols.branch = '⎇'
|
||||||
|
|
||||||
" CoC
|
" CoC
|
||||||
nmap <silent> gd <Plug>(coc-definition)
|
nmap <silent> gd <Plug>(coc-definition)
|
||||||
|
@ -97,19 +106,91 @@ nmap <silent> gi <Plug>(coc-implementation)
|
||||||
nmap <silent> gr <Plug>(coc-references)
|
nmap <silent> gr <Plug>(coc-references)
|
||||||
inoremap <silent><expr> <c-space> coc#refresh()
|
inoremap <silent><expr> <c-space> coc#refresh()
|
||||||
|
|
||||||
" Testing
|
"DAP
|
||||||
nmap <silent> <C-F10> :TestNearest<CR>
|
lua require('dap-python').setup('~/.venvs/debugpy/bin/python')
|
||||||
nmap <silent> <S-F10> :TestFile<CR>
|
lua require('dap-python').test_runner = 'pytest'
|
||||||
|
"lua require("dapui").setup()
|
||||||
|
lua << EOF
|
||||||
|
require("dapui").setup({
|
||||||
|
icons = { expanded = "▾", collapsed = "▸" },
|
||||||
|
mappings = {
|
||||||
|
-- Use a table to apply multiple mappings
|
||||||
|
expand = { "<CR>", "<2-LeftMouse>" },
|
||||||
|
open = "o",
|
||||||
|
remove = "d",
|
||||||
|
edit = "e",
|
||||||
|
repl = "r",
|
||||||
|
toggle = "t",
|
||||||
|
},
|
||||||
|
sidebar = {
|
||||||
|
-- You can change the order of elements in the sidebar
|
||||||
|
elements = {
|
||||||
|
-- Provide as ID strings or tables with "id" and "size" keys
|
||||||
|
{
|
||||||
|
id = "scopes",
|
||||||
|
size = 0.25, -- Can be float or integer > 1
|
||||||
|
},
|
||||||
|
{ id = "breakpoints", size = 0.25 },
|
||||||
|
{ id = "stacks", size = 0.25 },
|
||||||
|
{ id = "watches", size = 00.25 },
|
||||||
|
},
|
||||||
|
size = 40,
|
||||||
|
position = "right", -- Can be "left", "right", "top", "bottom"
|
||||||
|
},
|
||||||
|
tray = {
|
||||||
|
elements = { "repl" },
|
||||||
|
size = 10,
|
||||||
|
position = "bottom", -- Can be "left", "right", "top", "bottom"
|
||||||
|
},
|
||||||
|
floating = {
|
||||||
|
max_height = nil, -- These can be integers or a float between 0 and 1.
|
||||||
|
max_width = nil, -- Floats will be treated as percentage of your screen.
|
||||||
|
border = "single", -- Border style. Can be "single", "double" or "rounded"
|
||||||
|
mappings = {
|
||||||
|
close = { "q", "<Esc>" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
windows = { indent = 1 },
|
||||||
|
})
|
||||||
|
local dap, dapui = require("dap"), require("dapui")
|
||||||
|
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||||
|
dapui.open()
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
EOF
|
||||||
|
nnoremap <silent> <F9> :lua require'dap'.continue()<CR>
|
||||||
|
nnoremap <silent> <F21> :lua require('dap-python').test_method()<CR>
|
||||||
|
nnoremap <silent> <F8> :lua require'dap'.step_over()<CR>
|
||||||
|
nnoremap <silent> <F20> :lua require'dap'.step_into()<CR>
|
||||||
|
nnoremap <silent> <F32> :lua require'dap'.step_out()<CR>
|
||||||
|
nnoremap <silent> <leader>b :lua require'dap'.toggle_breakpoint()<CR>
|
||||||
|
|
||||||
|
" UltiSnips
|
||||||
|
let g:UltiSnipsExpandTrigger="<c-e>"
|
||||||
|
|
||||||
|
" Testing
|
||||||
|
let test#python#runner = 'pytest'
|
||||||
|
nmap <silent> <F34> :TestNearest<CR>
|
||||||
|
nmap <silent> <F22> :TestFile<CR>
|
||||||
|
"
|
||||||
" HTML
|
" HTML
|
||||||
let g:closetag_filenames = '*.html,*.js'
|
let g:closetag_filenames = '*.html,*.js'
|
||||||
let g:html_indent_style1 = "inc"
|
let g:html_indent_style1 = "inc"
|
||||||
|
|
||||||
|
" MARKDOWN
|
||||||
|
let g:mkdp_browser = 'firefox'
|
||||||
|
|
||||||
" FZF
|
" FZF
|
||||||
let $FZF_DEFAULT_COMMAND = 'ag --ignore .git -g ""'
|
let $FZF_DEFAULT_COMMAND = 'ag --ignore .git -g ""'
|
||||||
command! -bang -nargs=? -complete=dir HFiles
|
command! -bang -nargs=? -complete=dir HFiles
|
||||||
\ call fzf#vim#files(<q-args>, {'source': 'ag --hidden --ignore .git -g ""'}, <bang>0)
|
\ call fzf#vim#files(<q-args>, {'source': 'ag --hidden --ignore .git -g ""'}, <bang>0)
|
||||||
map <M-1> :NERDTreeToggle<CR>
|
" map <M-1> :NERDTreeToggle<CR>
|
||||||
|
map <M-1> :NnnPicker<CR>
|
||||||
map <M-2> :HFiles<CR>
|
map <M-2> :HFiles<CR>
|
||||||
map <M-3> :Buffers<CR>
|
map <M-3> :Buffers<CR>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue