system/nix/progs/nvim/lua/plugins.lua

77 lines
1.7 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-------------------------------------------------------------------------------
--
-- 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,
},
}