V2 of my Neovim configuration.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1016 B

1 year ago
-- General configuration
vim.g.ale_linters = {
python = {'black', 'flake8'},
c: {'clang-format'},
cpp: {'clang-format'}
}
vim.g.ale_fixers = {
['*'] = {'remove_trailing_lines', 'trim_whitespace'}
}
let g:ale_fix_on_save = 1
1 year ago
-- Treesitter config.
require'nvim-treesitter.configs'.setup {
ensure_installed = {
"c",
"lua",
"markdown",
"python",
"query",
"vim",
"vimdoc",
},
-- Prefer asynchronous install for ensure_installed.
sync_install = false,
auto_install = true,
highlight = {
enable = true,
-- Disable for excessively large files.
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
-- Disable vim regex highlighting. May intefer with some `indent` style stuff.
additional_vim_regex_highlighting = false,
},
}