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.
|
|
|
-- General configuration
|
|
|
|
vim.g.ale_linters = {
|
|
|
|
python = {'black', 'flake8'},
|
|
|
|
c = {'clang-format'},
|
|
|
|
cpp = {'clang-format'}
|
|
|
|
}
|
|
|
|
|
|
|
|
vim.g.ale_fixers = {
|
|
|
|
['*'] = {'remove_trailing_lines', 'trim_whitespace'}
|
|
|
|
}
|
|
|
|
|
|
|
|
vim.g.ale_fix_on_save = 1
|
|
|
|
|
|
|
|
-- LSP Configurations
|
|
|
|
require("mason").setup({
|
|
|
|
ui = {
|
|
|
|
icons = {
|
|
|
|
package_installed = "✓",
|
|
|
|
package_pending = "➜",
|
|
|
|
package_uninstalled = "✗"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
require("mason-lspconfig").setup()
|
|
|
|
|
|
|
|
-- Treesitter config.
|
|
|
|
require'nvim-treesitter.configs'.setup {
|
|
|
|
ensure_installed = {
|
|
|
|
"c",
|
|
|
|
"lua",
|
|
|
|
"markdown",
|
|
|
|
"python",
|
|
|
|
"rust",
|
|
|
|
"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,
|
|
|
|
},
|
|
|
|
}
|