Nvim: modernize plugin configuration
This commit is contained in:
@@ -1,2 +1,37 @@
|
||||
" Disable context.vim on json files
|
||||
let g:context_filetype_blacklist = ["json", "log"]
|
||||
" Configuration for context.vim
|
||||
"" 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
|
||||
--vim.opt.termguicolors = true
|
||||
--vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]]
|
||||
--vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]]
|
||||
--vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]]
|
||||
--vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]]
|
||||
--vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]]
|
||||
--vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]]
|
||||
vim.opt.termguicolors = true
|
||||
vim.cmd [[highlight IndentBlanklineIndent1 guifg=#E06C75 gui=nocombine]]
|
||||
vim.cmd [[highlight IndentBlanklineIndent2 guifg=#E5C07B gui=nocombine]]
|
||||
vim.cmd [[highlight IndentBlanklineIndent3 guifg=#98C379 gui=nocombine]]
|
||||
vim.cmd [[highlight IndentBlanklineIndent4 guifg=#56B6C2 gui=nocombine]]
|
||||
vim.cmd [[highlight IndentBlanklineIndent5 guifg=#61AFEF gui=nocombine]]
|
||||
vim.cmd [[highlight IndentBlanklineIndent6 guifg=#C678DD gui=nocombine]]
|
||||
|
||||
--vim.opt.list = true
|
||||
--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_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_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_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_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_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_window_picker_exclude = {
|
||||
\ 'filetype': [
|
||||
\ 'notify',
|
||||
\ 'packer',
|
||||
\ 'qf'
|
||||
\ ],
|
||||
\ 'buftype': [
|
||||
\ 'terminal'
|
||||
\ ]
|
||||
\ }
|
||||
" 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
|
||||
" selectable.
|
||||
@@ -84,8 +71,12 @@ require'nvim-tree'.setup {
|
||||
ignore_ft_on_setup = {},
|
||||
auto_close = false,
|
||||
open_on_tab = false,
|
||||
hijack_cursor = false,
|
||||
hijack_cursor = true,
|
||||
update_cwd = false,
|
||||
hijack_directories = {
|
||||
enable = true,
|
||||
auto_open = true,
|
||||
},
|
||||
update_to_buf_dir = {
|
||||
enable = true,
|
||||
auto_open = true,
|
||||
@@ -100,7 +91,7 @@ require'nvim-tree'.setup {
|
||||
}
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = false,
|
||||
enable = true,
|
||||
update_cwd = false,
|
||||
ignore_list = {}
|
||||
},
|
||||
@@ -114,26 +105,41 @@ require'nvim-tree'.setup {
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = true,
|
||||
ignore = false,
|
||||
timeout = 500,
|
||||
},
|
||||
view = {
|
||||
width = 30,
|
||||
height = 30,
|
||||
hide_root_folder = false,
|
||||
hide_root_folder = true,
|
||||
side = 'left',
|
||||
auto_resize = false,
|
||||
auto_resize = true,
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
list = {}
|
||||
},
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
signcolumn = "yes"
|
||||
signcolumn = "no"
|
||||
},
|
||||
trash = {
|
||||
cmd = "trash",
|
||||
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
|
||||
|
||||
@@ -34,7 +34,7 @@ ts.setup {
|
||||
enable = true,
|
||||
-- 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
|
||||
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
|
||||
-- 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.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
|
||||
Reference in New Issue
Block a user