Nvim: modernize plugin configuration
This commit is contained in:
@@ -1,2 +1,37 @@
|
|||||||
" Disable context.vim on json files
|
" Configuration for context.vim
|
||||||
let g:context_filetype_blacklist = ["json", "log"]
|
"" Disable context.vim on json files
|
||||||
|
""let g:context_filetype_blacklist = ["json", "log"]
|
||||||
|
lua << EOF
|
||||||
|
require'treesitter-context'.setup{
|
||||||
|
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||||
|
throttle = true, -- Throttles plugin updates (may improve performance)
|
||||||
|
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||||
|
patterns = { -- Match patterns for TS nodes. These get wrapped to match at word boundaries.
|
||||||
|
-- For all filetypes
|
||||||
|
-- Note that setting an entry here replaces all other patterns for this entry.
|
||||||
|
-- By setting the 'default' entry below, you can control which nodes you want to
|
||||||
|
-- appear in the context window.
|
||||||
|
default = {
|
||||||
|
'class',
|
||||||
|
'function',
|
||||||
|
'method',
|
||||||
|
'for',
|
||||||
|
'while',
|
||||||
|
'if',
|
||||||
|
'switch',
|
||||||
|
-- 'case',
|
||||||
|
},
|
||||||
|
-- Example for a specific filetype.
|
||||||
|
-- If a pattern is missing, *open a PR* so everyone can benefit.
|
||||||
|
rust = {
|
||||||
|
'impl_item',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exact_patterns = {
|
||||||
|
-- Example for a specific filetype with Lua patterns
|
||||||
|
-- Treat patterns.rust as a Lua pattern (i.e "^impl_item$" will
|
||||||
|
-- exactly match "impl_item" only)
|
||||||
|
rust = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
lua << EOF
|
lua << EOF
|
||||||
--vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
--vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]]
|
vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]]
|
||||||
--vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]]
|
vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]]
|
||||||
--vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]]
|
vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]]
|
||||||
--vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]]
|
vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]]
|
||||||
--vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]]
|
vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]]
|
||||||
--vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]]
|
vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]]
|
||||||
|
|
||||||
--vim.opt.list = true
|
--vim.opt.list = true
|
||||||
--vim.opt.listchars:append("space:⋅")
|
--vim.opt.listchars:append("space:⋅")
|
||||||
|
|||||||
@@ -1,27 +1,14 @@
|
|||||||
let g:nvim_tree_quit_on_open = 1 "0 by default, closes the tree when you open a file
|
|
||||||
let g:nvim_tree_indent_markers = 1 "0 by default, this option shows indent markers when folders are open
|
let g:nvim_tree_indent_markers = 1 "0 by default, this option shows indent markers when folders are open
|
||||||
let g:nvim_tree_git_hl = 1 "0 by default, will enable file highlight for git attributes (can be used without the icons).
|
let g:nvim_tree_git_hl = 1 "0 by default, will enable file highlight for git attributes (can be used without the icons).
|
||||||
let g:nvim_tree_highlight_opened_files = 1 "0 by default, will enable folder and file icon highlight for opened files/directories.
|
let g:nvim_tree_highlight_opened_files = 1 "0 by default, will enable folder and file icon highlight for opened files/directories.
|
||||||
let g:nvim_tree_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options
|
let g:nvim_tree_root_folder_modifier = ':~' "This is the default. See :help filename-modifiers for more options
|
||||||
let g:nvim_tree_add_trailing = 1 "0 by default, append a trailing slash to folder names
|
let g:nvim_tree_add_trailing = 1 "0 by default, append a trailing slash to folder names
|
||||||
let g:nvim_tree_group_empty = 1 " 0 by default, compact folders that only contain a single folder into one node in the file tree
|
let g:nvim_tree_group_empty = 1 " 0 by default, compact folders that only contain a single folder into one node in the file tree
|
||||||
let g:nvim_tree_change_dir_global = 1 "0 by default, use :cd when changing directories.
|
|
||||||
let g:nvim_tree_disable_window_picker = 1 "0 by default, will disable the window picker.
|
|
||||||
let g:nvim_tree_icon_padding = ' ' "one space by default, used for rendering the space between the icon and the filename. Use with caution, it could break rendering if you set an empty string depending on your font.
|
let g:nvim_tree_icon_padding = ' ' "one space by default, used for rendering the space between the icon and the filename. Use with caution, it could break rendering if you set an empty string depending on your font.
|
||||||
let g:nvim_tree_symlink_arrow = ' >> ' " defaults to ' ➛ '. used as a separator between symlinks' source and target.
|
let g:nvim_tree_symlink_arrow = ' >> ' " defaults to ' ➛ '. used as a separator between symlinks' source and target.
|
||||||
let g:nvim_tree_respect_buf_cwd = 0 "0 by default, will change cwd of nvim-tree to that of new buffer's when opening nvim-tree.
|
let g:nvim_tree_respect_buf_cwd = 0 "0 by default, will change cwd of nvim-tree to that of new buffer's when opening nvim-tree.
|
||||||
let g:nvim_tree_create_in_closed_folder = 0 "1 by default, When creating files, sets the path of a file when cursor is on a closed folder to the parent folder when 0, and inside the folder when 1.
|
let g:nvim_tree_create_in_closed_folder = 0 "1 by default, When creating files, sets the path of a file when cursor is on a closed folder to the parent folder when 0, and inside the folder when 1.
|
||||||
let g:nvim_tree_refresh_wait = 1000 " control how often the tree can be refreshed, 1000 means the tree can be refresh once per 1000ms.
|
let g:nvim_tree_refresh_wait = 1000 " control how often the tree can be refreshed, 1000 means the tree can be refresh once per 1000ms.
|
||||||
let g:nvim_tree_window_picker_exclude = {
|
|
||||||
\ 'filetype': [
|
|
||||||
\ 'notify',
|
|
||||||
\ 'packer',
|
|
||||||
\ 'qf'
|
|
||||||
\ ],
|
|
||||||
\ 'buftype': [
|
|
||||||
\ 'terminal'
|
|
||||||
\ ]
|
|
||||||
\ }
|
|
||||||
" Dictionary of buffer option names mapped to a list of option values that
|
" Dictionary of buffer option names mapped to a list of option values that
|
||||||
" indicates to the window picker that the buffer's window should not be
|
" indicates to the window picker that the buffer's window should not be
|
||||||
" selectable.
|
" selectable.
|
||||||
@@ -84,8 +71,12 @@ require'nvim-tree'.setup {
|
|||||||
ignore_ft_on_setup = {},
|
ignore_ft_on_setup = {},
|
||||||
auto_close = false,
|
auto_close = false,
|
||||||
open_on_tab = false,
|
open_on_tab = false,
|
||||||
hijack_cursor = false,
|
hijack_cursor = true,
|
||||||
update_cwd = false,
|
update_cwd = false,
|
||||||
|
hijack_directories = {
|
||||||
|
enable = true,
|
||||||
|
auto_open = true,
|
||||||
|
},
|
||||||
update_to_buf_dir = {
|
update_to_buf_dir = {
|
||||||
enable = true,
|
enable = true,
|
||||||
auto_open = true,
|
auto_open = true,
|
||||||
@@ -100,7 +91,7 @@ require'nvim-tree'.setup {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
update_focused_file = {
|
update_focused_file = {
|
||||||
enable = false,
|
enable = true,
|
||||||
update_cwd = false,
|
update_cwd = false,
|
||||||
ignore_list = {}
|
ignore_list = {}
|
||||||
},
|
},
|
||||||
@@ -114,26 +105,41 @@ require'nvim-tree'.setup {
|
|||||||
},
|
},
|
||||||
git = {
|
git = {
|
||||||
enable = true,
|
enable = true,
|
||||||
ignore = true,
|
ignore = false,
|
||||||
timeout = 500,
|
timeout = 500,
|
||||||
},
|
},
|
||||||
view = {
|
view = {
|
||||||
width = 30,
|
width = 30,
|
||||||
height = 30,
|
height = 30,
|
||||||
hide_root_folder = false,
|
hide_root_folder = true,
|
||||||
side = 'left',
|
side = 'left',
|
||||||
auto_resize = false,
|
auto_resize = true,
|
||||||
mappings = {
|
mappings = {
|
||||||
custom_only = false,
|
custom_only = false,
|
||||||
list = {}
|
list = {}
|
||||||
},
|
},
|
||||||
number = false,
|
number = false,
|
||||||
relativenumber = false,
|
relativenumber = false,
|
||||||
signcolumn = "yes"
|
signcolumn = "no"
|
||||||
},
|
},
|
||||||
trash = {
|
trash = {
|
||||||
cmd = "trash",
|
cmd = "trash",
|
||||||
require_confirm = true
|
require_confirm = true
|
||||||
}
|
},
|
||||||
|
actions = {
|
||||||
|
open_file = {
|
||||||
|
quit_on_open = true,
|
||||||
|
disable_window_picker = true,
|
||||||
|
window_picker = {
|
||||||
|
exclude = {
|
||||||
|
filetype = { "notify", "packer", "qf" },
|
||||||
|
buftype = { "terminal" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
change_dir = {
|
||||||
|
global = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ ts.setup {
|
|||||||
enable = true,
|
enable = true,
|
||||||
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
|
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
|
||||||
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||||
max_file_lines = nil, -- Do not enable for files with more than n lines, int
|
max_file_lines = 10000, -- Do not enable for files with more than n lines, int
|
||||||
-- colors = {}, -- table of hex strings
|
-- colors = {}, -- table of hex strings
|
||||||
-- termcolors = {} -- table of colour name strings
|
-- termcolors = {} -- table of colour name strings
|
||||||
},
|
},
|
||||||
@@ -49,6 +49,11 @@ ts.setup {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
matchup = {
|
||||||
|
enable = true,
|
||||||
|
-- disable = { "c", "ruby" },
|
||||||
|
include_match_words
|
||||||
|
},
|
||||||
}
|
}
|
||||||
--vim.opt.foldmethod = "expr"
|
--vim.opt.foldmethod = "expr"
|
||||||
--vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
--vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ Plug 'ms-jpq/coq_nvim', {'branch': 'coq'}
|
|||||||
Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'}
|
Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'}
|
||||||
Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'}
|
Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'}
|
||||||
|
|
||||||
Plug 'wellle/context.vim'
|
|
||||||
"Plug 'dbeniamine/cheat.sh-vim'
|
"Plug 'dbeniamine/cheat.sh-vim'
|
||||||
Plug 'puremourning/vimspector'
|
Plug 'puremourning/vimspector'
|
||||||
"Plug 'vim-test/vim-test'
|
"Plug 'vim-test/vim-test'
|
||||||
@@ -33,7 +32,11 @@ Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
|||||||
Plug 'nvim-treesitter/playground'
|
Plug 'nvim-treesitter/playground'
|
||||||
Plug 'p00f/nvim-ts-rainbow'
|
Plug 'p00f/nvim-ts-rainbow'
|
||||||
Plug 'nvim-treesitter/nvim-treesitter-textobjects'
|
Plug 'nvim-treesitter/nvim-treesitter-textobjects'
|
||||||
|
Plug 'romgrk/nvim-treesitter-context'
|
||||||
|
|
||||||
Plug 'cdelledonne/vim-cmake'
|
Plug 'cdelledonne/vim-cmake'
|
||||||
|
|
||||||
|
Plug 'andymass/vim-matchup'
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Completion {{{
|
" Completion {{{
|
||||||
@@ -88,20 +91,21 @@ Plug 'lukas-reineke/virt-column.nvim'
|
|||||||
"Plug 'jez/vim-superman' "vman application
|
"Plug 'jez/vim-superman' "vman application
|
||||||
Plug 'glacambre/firenvim'
|
Plug 'glacambre/firenvim'
|
||||||
"Plug 'JMcKiern/vim-shoot'
|
"Plug 'JMcKiern/vim-shoot'
|
||||||
|
Plug 'mrjones2014/legendary.nvim'
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Note taking {{{
|
" Note taking {{{
|
||||||
Plug 'vimwiki/vimwiki'
|
Plug 'vimwiki/vimwiki'
|
||||||
Plug 'michal-h21/vimwiki-sync'
|
Plug 'michal-h21/vimwiki-sync'
|
||||||
Plug 'michal-h21/vim-zettel'
|
"Plug 'michal-h21/vim-zettel'
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Colorschemes {{{
|
" Colorschemes {{{
|
||||||
Plug 'jaredgorski/spacecamp'
|
|
||||||
Plug 'lifepillar/vim-gruvbox8'
|
|
||||||
Plug 'dylanaraps/wal'
|
|
||||||
Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes'
|
Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes'
|
||||||
Plug 'tanvirtin/monokai.nvim'
|
"Plug 'jaredgorski/spacecamp'
|
||||||
|
"Plug 'lifepillar/vim-gruvbox8'
|
||||||
|
Plug 'dylanaraps/wal'
|
||||||
|
"Plug 'tanvirtin/monokai.nvim'
|
||||||
Plug 'marko-cerovac/material.nvim'
|
Plug 'marko-cerovac/material.nvim'
|
||||||
" }}}
|
" }}}
|
||||||
"
|
"
|
||||||
@@ -130,12 +134,12 @@ set background=dark
|
|||||||
"colorscheme wal
|
"colorscheme wal
|
||||||
let g:material_style = "deep ocean"
|
let g:material_style = "deep ocean"
|
||||||
colorscheme material
|
colorscheme material
|
||||||
highlight MatchParen cterm=underline ctermbg=black ctermfg=NONE
|
"highlight MatchParen cterm=underline ctermbg=black ctermfg=NONE
|
||||||
highlight VirtColumn ctermfg=DarkGrey ctermbg=NONE
|
"highlight VirtColumn ctermfg=DarkGrey ctermbg=NONE
|
||||||
set listchars=tab:▸\ ,trail:¬
|
set listchars=tab:▸\ ,trail:¬
|
||||||
set list
|
set list
|
||||||
hi clear SpellBad
|
"hi clear SpellBad
|
||||||
hi SpellBad cterm=underline
|
"hi SpellBad cterm=underline
|
||||||
|
|
||||||
set tabstop=2
|
set tabstop=2
|
||||||
set shiftwidth=2
|
set shiftwidth=2
|
||||||
@@ -154,6 +158,8 @@ set scrolloff=10
|
|||||||
|
|
||||||
set inccommand="split"
|
set inccommand="split"
|
||||||
|
|
||||||
|
set lazyredraw
|
||||||
|
|
||||||
" space one line, home,end globally increase/decrease
|
" space one line, home,end globally increase/decrease
|
||||||
nnoremap <Home> zc
|
nnoremap <Home> zc
|
||||||
nnoremap <End> zo
|
nnoremap <End> zo
|
||||||
@@ -207,14 +213,7 @@ set updatetime=300
|
|||||||
set shortmess+=c
|
set shortmess+=c
|
||||||
set shortmess-=F
|
set shortmess-=F
|
||||||
|
|
||||||
" Always show the signcolumn, otherwise it would shift the text each time
|
|
||||||
" diagnostics appear/become resolved.
|
|
||||||
if has("patch-8.1.1564")
|
|
||||||
" Recently vim can merge signcolumn and number column into one
|
|
||||||
set signcolumn=number
|
set signcolumn=number
|
||||||
else
|
|
||||||
set signcolumn=yes
|
|
||||||
endif
|
|
||||||
|
|
||||||
set wildmode=longest,list,full
|
set wildmode=longest,list,full
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user