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
1.1 KiB

" General configuration
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'python': ['black', 'flake8'],
\ 'c': ['clang-format'],
\ 'c++': ['clang-format']
\}
let g:ale_fix_on_save = 1
"" Treesitter config.
"" TODO: Remove lua << EOF and EOF when all files are converted
"" to lua.
lua << EOF
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,
},
}
EOF