78 lines
1.7 KiB
Lua
78 lines
1.7 KiB
Lua
|
-------------------------------------------------------------------------------
|
|||
|
--
|
|||
|
-- NerdTree
|
|||
|
--
|
|||
|
|
|||
|
vim.g.NERDTreeDirArrowExpandable = '▸'
|
|||
|
vim.g.NERDTreeDirArrowCollapsible = '▾'
|
|||
|
|
|||
|
vim.g.NERDTreeMiniamlUI = 1
|
|||
|
vim.g.NERDTreeDirArrows = 1
|
|||
|
|
|||
|
-- Nerdtree git plugin symbols
|
|||
|
vim.g.NERDTreeGitStatusIndicatorMapCustom = {
|
|||
|
Modified = 'ᵐ',
|
|||
|
Staged = 'ˢ',
|
|||
|
Untracked = 'ᵘ',
|
|||
|
Renamed = 'ʳ',
|
|||
|
Unmerged = 'ᶴ',
|
|||
|
Deleted = 'ˣ',
|
|||
|
Dirty = '˜',
|
|||
|
Clean = 'ᵅ',
|
|||
|
Unknown = '?',
|
|||
|
}
|
|||
|
|
|||
|
vim.keymap.set('n', '<leader>nt', ':NERDTreeToggle<CR>')
|
|||
|
vim.keymap.set('n', '<leader>nf', ':NERDTreeFind<CR>')
|
|||
|
|
|||
|
-------------------------------------------------------------------------------
|
|||
|
--
|
|||
|
-- NeoFormat
|
|||
|
--
|
|||
|
vim.g.neoformat_try_node_exe = 1
|
|||
|
vim.g.neoformat_only_msg_on_error = 1
|
|||
|
vim.g.neoformat_enabled_markdown = {"denofmt"}
|
|||
|
|
|||
|
local format_augroup = vim.api.nvim_create_augroup('format', {})
|
|||
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
|||
|
pattern = '*',
|
|||
|
group = spell_check_augroup,
|
|||
|
callback = 'try | undojoin | NeoFormat | catch /E790/ | NeoFormat | endtry'
|
|||
|
})
|
|||
|
|
|||
|
-------------------------------------------------------------------------------
|
|||
|
--
|
|||
|
-- GitGutter
|
|||
|
--
|
|||
|
vim.g.gitgutter_sign_priority = 1
|
|||
|
vim.g.gitgutter_set_sign_backgrounds = 0
|
|||
|
vim.g.gitgutter_map_keys = 0
|
|||
|
|
|||
|
vim.keymap.set('n', '<leader>ghp', ':GitGutterPreviewHunk<CR>')
|
|||
|
|
|||
|
|
|||
|
-------------------------------------------------------------------------------
|
|||
|
--
|
|||
|
-- TreeSitter
|
|||
|
--
|
|||
|
require'nvim-treesitter.configs'.setup {
|
|||
|
-- A list of parser names, or "all"
|
|||
|
ensure_installed = {
|
|||
|
"typescript",
|
|||
|
"tsx",
|
|||
|
"rust",
|
|||
|
"haskell",
|
|||
|
},
|
|||
|
|
|||
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
|||
|
sync_install = false,
|
|||
|
|
|||
|
highlight = {
|
|||
|
enable = true,
|
|||
|
},
|
|||
|
|
|||
|
indent = {
|
|||
|
enable = true,
|
|||
|
},
|
|||
|
}
|