2021-09-02 17:53:53 -04:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
function M.colorizer_conf()
|
|
|
|
require('colorizer').setup(
|
|
|
|
{'*'},
|
|
|
|
{
|
|
|
|
RGB = true, -- #RGB hex codes
|
|
|
|
RRGGBB = true, -- #RRGGBB hex codes
|
|
|
|
names = true, -- "Name" codes like Blue
|
|
|
|
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
|
|
|
rgb_fn = true, -- CSS rgb() and rgba() functions
|
|
|
|
hsl_fn = true, -- CSS hsl() and hsla() functions
|
|
|
|
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
|
|
|
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
|
|
|
mode = 'background' -- Set the display mode.
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
function M.blankline_conf()
|
|
|
|
vim.g.indent_blankline_char = '│'
|
|
|
|
-- vim.g.indent_blankline_space_char = '·'
|
|
|
|
vim.g.indent_blankline_show_first_indent_level = true
|
|
|
|
vim.g.indent_blankline_filetype_exclude = {
|
|
|
|
'startify',
|
|
|
|
'dashboard',
|
2021-09-24 05:03:02 -04:00
|
|
|
'alpha',
|
2021-09-02 17:53:53 -04:00
|
|
|
'dotooagenda',
|
|
|
|
'log',
|
|
|
|
'fugitive',
|
|
|
|
'gitcommit',
|
|
|
|
'packer',
|
|
|
|
'vimwiki',
|
|
|
|
'markdown',
|
|
|
|
'org',
|
|
|
|
'json',
|
|
|
|
'txt',
|
|
|
|
'vista',
|
|
|
|
'help',
|
|
|
|
'todoist',
|
|
|
|
'NvimTree',
|
|
|
|
'peekaboo',
|
|
|
|
'git',
|
|
|
|
'TelescopePrompt',
|
|
|
|
'undotree',
|
|
|
|
'flutterToolsOutline',
|
|
|
|
'' -- for all buffers without a file type
|
|
|
|
}
|
|
|
|
vim.g.indent_blankline_buftype_exclude = {'terminal', 'nofile'}
|
|
|
|
vim.g.indent_blankline_show_trailing_blankline_indent = false
|
|
|
|
vim.g.indent_blankline_show_current_context = true
|
|
|
|
vim.g.indent_blankline_context_patterns = {
|
|
|
|
'class',
|
|
|
|
'function',
|
|
|
|
'method',
|
|
|
|
'block',
|
|
|
|
'list_literal',
|
|
|
|
'selector',
|
|
|
|
'^if',
|
|
|
|
'^table',
|
|
|
|
'if_statement',
|
|
|
|
'while',
|
|
|
|
'for'
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Refresh often, since it is lazy-loaded
|
2021-09-09 10:01:41 -04:00
|
|
|
-- vim.api.nvim_command('autocmd CursorMoved * IndentBlanklineRefresh')
|
2021-09-02 17:53:53 -04:00
|
|
|
end
|
|
|
|
|
2021-09-23 14:12:21 -04:00
|
|
|
function M.aniseed_conf()
|
|
|
|
-- Compile fennel config to lua on startup
|
|
|
|
require('aniseed.env').init()
|
|
|
|
end
|
|
|
|
|
2021-09-02 17:53:53 -04:00
|
|
|
function M.treesitter_conf()
|
|
|
|
vim.api.nvim_command('set foldmethod=expr')
|
|
|
|
vim.api.nvim_command('set foldexpr=nvim_treesitter#foldexpr()')
|
|
|
|
|
2021-09-22 14:21:54 -04:00
|
|
|
-- Additional parser for rest.nvim (*.http files)
|
|
|
|
local parser_configs = require('nvim-treesitter.parsers').get_parser_configs()
|
|
|
|
parser_configs.http = {
|
|
|
|
install_info = {
|
|
|
|
url = 'https://github.com/NTBBloodbath/tree-sitter-http',
|
|
|
|
files = { 'src/parser.c' },
|
|
|
|
branch = 'main'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-02 17:53:53 -04:00
|
|
|
require('nvim-treesitter.configs').setup {
|
|
|
|
ensure_installed = 'maintained',
|
|
|
|
highlight = {enable = true},
|
|
|
|
textobjects = {
|
|
|
|
select = {
|
|
|
|
enable = true,
|
|
|
|
keymaps = {
|
|
|
|
['af'] = '@function.outer',
|
|
|
|
['if'] = '@function.inner',
|
|
|
|
['ac'] = '@class.outer',
|
|
|
|
['ic'] = '@class.inner'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
move = {
|
|
|
|
enable = true,
|
|
|
|
set_jumps = true, -- whether to set jumps in the jumplist
|
|
|
|
goto_next_start = {
|
|
|
|
[']['] = '@function.outer',
|
|
|
|
[']m'] = '@class.outer'
|
|
|
|
},
|
|
|
|
goto_next_end = {
|
|
|
|
[']]'] = '@function.outer',
|
|
|
|
[']M'] = '@class.outer'
|
|
|
|
},
|
|
|
|
goto_previous_start = {
|
|
|
|
['[['] = '@function.outer',
|
|
|
|
['[m'] = '@class.outer'
|
|
|
|
},
|
|
|
|
goto_previous_end = {
|
|
|
|
['[]'] = '@function.outer',
|
|
|
|
['[M'] = '@class.outer'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
matchup = {enable = true}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
function M.rainbow_conf()
|
|
|
|
require('nvim-treesitter.configs').setup {
|
|
|
|
rainbow = {
|
|
|
|
enable = true,
|
|
|
|
extended_mode = true,
|
|
|
|
max_file_lines = 1000
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
function M.matchup_conf()
|
|
|
|
vim.g.matchup_matchparen_offscreen = {method = 'popup'}
|
|
|
|
end
|
|
|
|
|
|
|
|
function M.hop_conf()
|
|
|
|
require('hop').setup{keys = 'etovxqpdygfblzhckisuran'}
|
|
|
|
end
|
|
|
|
|
2021-09-04 06:00:25 -04:00
|
|
|
function M.eft_conf()
|
|
|
|
vim.g.eft_index_function = {all = function() return true end}
|
|
|
|
end
|
|
|
|
|
2021-09-02 17:53:53 -04:00
|
|
|
function M.comment_conf()
|
|
|
|
require('nvim_comment').setup({comment_empty = false})
|
|
|
|
end
|
|
|
|
|
2021-09-25 17:06:40 -04:00
|
|
|
function M.project_conf()
|
|
|
|
require('project_nvim').setup {
|
|
|
|
manual_mode = false,
|
|
|
|
detection_methods = {'pattern', 'lsp'},
|
|
|
|
patterns = {'.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', '*.pro', 'Dockerfile', '>Code'},
|
|
|
|
show_hidden = true,
|
|
|
|
silent_chdir = true,
|
|
|
|
datapath = vim.fn.stdpath('data')
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
2021-09-02 17:53:53 -04:00
|
|
|
return M
|