mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-09 15:06:38 -05:00
Replace vim-togglelist with qf.nvim so we can create a more comfortable experience
This commit is contained in:
parent
42b7afd201
commit
0c8b46b803
6 changed files with 53 additions and 7 deletions
6
.gitmodules
vendored
6
.gitmodules
vendored
|
@ -7,9 +7,6 @@
|
|||
[submodule "vim/bundle/lightline.vim"]
|
||||
path = vim/bundle/lightline.vim
|
||||
url = https://github.com/itchyny/lightline.vim
|
||||
[submodule "vim/bundle/vim-togglelist"]
|
||||
path = vim/bundle/vim-togglelist
|
||||
url = https://github.com/milkypostman/vim-togglelist.git
|
||||
[submodule "vim/bundle/vim-fugitive"]
|
||||
path = vim/bundle/vim-fugitive
|
||||
url = https://github.com/tpope/vim-fugitive.git
|
||||
|
@ -88,3 +85,6 @@
|
|||
[submodule "vim/bundle/vista.vim"]
|
||||
path = vim/bundle/vista.vim
|
||||
url = https://github.com/liuchengxu/vista.vim
|
||||
[submodule "vim/bundle/qf.nvim"]
|
||||
path = vim/bundle/qf.nvim
|
||||
url = https://github.com/ten3roberts/qf.nvim
|
||||
|
|
|
@ -130,6 +130,7 @@ For a complete list of mappings specific to **darkcloud-nvimconfig**, check the
|
|||
* [nvim-surround](https://github.com/kylechui/nvim-surround): Add/change/delete surrounding delimiter pairs with ease
|
||||
* [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter): Treesitter configurations and abstraction layer for Neovim
|
||||
* [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects): Syntax aware text-objects, select, move, swap, and peek support
|
||||
* [qf.nvim](https://github.com/ten3roberts/qf.nvim): Extends the default quickfix and location lists for neovim
|
||||
* [ReplaceWithRegister](https://github.com/vim-scripts/ReplaceWithRegister): Replace text with the contents of a register (for paste+replace without writing over the buffer)
|
||||
* [splitjoin.vim](https://github.com/AndrewRadev/splitjoin.vim): Simplifies the transition between multiline and single-line code
|
||||
* [tabular](https://github.com/godlygeek/tabular): Vim script for text filtering and alignment
|
||||
|
@ -139,7 +140,6 @@ For a complete list of mappings specific to **darkcloud-nvimconfig**, check the
|
|||
* [vim-pathogen](https://github.com/tpope/vim-pathogen): A plugin to load other plugins while keeping them isolated in their own directory structure rather than all dumped together
|
||||
* [vim-polyglot-darkcloud](https://github.com/prurigro/vim-polyglot-darkcloud): The darkcloud-nvimconfig fork of a meta-package that attempts to provide the best syntax plugins for each file type
|
||||
* [vim-signify](https://github.com/mhinz/vim-signify): When a version controlled file is changed, this displays a column showing where and how, and allows for navigation to and between differences
|
||||
* [vim-togglelist](https://github.com/milkypostman/vim-togglelist): A simple plugin for vim that allows you to bind a key to toggle the Location List and the Quickfix List
|
||||
* [vim-trailing-whitespace](https://github.com/bronson/vim-trailing-whitespace): Highlights and allows for the easy removal of trailing whitespace in documents
|
||||
* [vista.vim](https://github.com/liuchengxu/vista.vim): Viewer & Finder for LSP symbols and tags
|
||||
|
||||
|
|
1
vim/bundle/qf.nvim
Submodule
1
vim/bundle/qf.nvim
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit e7db62a4ec814c12585c0c8262d3304000a1af2e
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 48f0d30292efdf20edc883e61b121e6123e03df7
|
|
@ -154,6 +154,9 @@
|
|||
" >> | (N) -> next difference (vimdiff/signify)
|
||||
" << | (N) -> previous difference (vimdiff/signify)
|
||||
"
|
||||
" [[ | (N) -> jump to previous issue in the location list (qf.nvim)
|
||||
" ]] | (N) -> jump to the next issue in the location list (qf.nvim)
|
||||
"
|
||||
" (selection)
|
||||
" <Ctrl-a> | (N) -> select all text
|
||||
" <Ctrl-a> | (V) -> select all text
|
||||
|
@ -415,7 +418,7 @@
|
|||
nnoremap <silent><expr> <Leader>] ':Vista!!<CR>'
|
||||
|
||||
"toggle the location list
|
||||
nnoremap <silent><expr> <Leader><Leader> ':call ToggleLocationList()<CR>'
|
||||
nnoremap <Leader><Leader> <cmd>lua require('qf').toggle('l', false)<CR>
|
||||
"}
|
||||
|
||||
"SPELLCHECK:{
|
||||
|
@ -542,6 +545,10 @@
|
|||
nmap [g <plug>(signify-prev-hunk)
|
||||
nmap >> ]g
|
||||
nmap << [g
|
||||
|
||||
"jump to the previous and next issues in the location list
|
||||
nnoremap [[ <cmd>lua require('qf').above('l')<CR>
|
||||
nnoremap ]] <cmd>lua require('qf').below('l')<CR>
|
||||
"}
|
||||
|
||||
"SELECTION:{
|
||||
|
@ -576,7 +583,7 @@
|
|||
autocmd FileType qf map <buffer> h k
|
||||
autocmd FileType qf map <buffer> <2-LeftMouse> <CR>
|
||||
autocmd FileType qf map <buffer> <Space> <CR><C-w>p
|
||||
autocmd FileType qf if getwininfo(win_getid())[0]['loclist'] == 0|map <buffer> <silent><expr> q ':call ToggleQuickfixList()<CR>'|else|map <buffer> <silent><expr> q ':call ToggleLocationList()<CR>'|endif
|
||||
autocmd FileType qf map <buffer> <silent><expr> q ':q<CR>'
|
||||
|
||||
"vimdiff
|
||||
autocmd FilterWritePre * if &diff|nmap <buffer> <silent><expr> <Leader><> ':diffu<CR>'|endif
|
||||
|
|
39
vim/config/plugins/qf.lua
Normal file
39
vim/config/plugins/qf.lua
Normal file
|
@ -0,0 +1,39 @@
|
|||
require("qf").setup {
|
||||
-- Location list configuration
|
||||
l = {
|
||||
auto_close = true, -- Automatically close location/quickfix list if empty
|
||||
auto_follow = 'prev', -- Follow current entry, possible values: prev,next,nearest, or false to disable
|
||||
auto_follow_limit = 8, -- Do not follow if entry is further away than x lines
|
||||
follow_slow = true, -- Only follow on CursorHold
|
||||
auto_open = false, -- Automatically open list on QuickFixCmdPost
|
||||
auto_resize = true, -- Auto resize and shrink location list if less than `max_height`
|
||||
max_height = 12, -- Maximum height of location/quickfix list
|
||||
min_height = 5, -- Minimum height of location/quickfix list
|
||||
wide = true, -- Open list at the very bottom of the screen, stretching the whole width.
|
||||
number = false, -- Show line numbers in list
|
||||
relativenumber = false, -- Show relative line numbers in list
|
||||
unfocus_close = false, -- Close list when window loses focus
|
||||
focus_open = false, -- Auto open list on window focus if it contains items
|
||||
},
|
||||
|
||||
-- Quickfix list configuration
|
||||
c = {
|
||||
auto_close = true, -- Automatically close location/quickfix list if empty
|
||||
auto_follow = 'prev', -- Follow current entry, possible values: prev,next,nearest, or false to disable
|
||||
auto_follow_limit = 8, -- Do not follow if entry is further away than x lines
|
||||
follow_slow = true, -- Only follow on CursorHold
|
||||
auto_open = false, -- Automatically open list on QuickFixCmdPost
|
||||
auto_resize = true, -- Auto resize and shrink location list if less than `max_height`
|
||||
max_height = 12, -- Maximum height of location/quickfix list
|
||||
min_height = 5, -- Minimum height of location/quickfix list
|
||||
wide = true, -- Open list at the very bottom of the screen, stretching the whole width.
|
||||
number = false, -- Show line numbers in list
|
||||
relativenumber = false, -- Show relative line numbers in list
|
||||
unfocus_close = false, -- Close list when window loses focus
|
||||
focus_open = false, -- Auto open list on window focus if it contains items
|
||||
},
|
||||
|
||||
close_other = false, -- Close location list when quickfix list opens
|
||||
pretty = false, -- Pretty print quickfix lists
|
||||
silent = true, -- Suppress messages like "(1 of 3): *line content*" on jump
|
||||
}
|
Loading…
Reference in a new issue