dotfiles/nvim/init.lua

48 lines
1.5 KiB
Lua

require('plugins')
require('autopairs_config')
require('settings')
require('lsp_config')
require('telescope_config')
require('lualine_config')
require('mappings')
require('trim').setup({
disable = {"markdown", "vimwiki"},
patterns = {
[[%s/\s\+$//e]], -- remove unwanted spaces
[[%s/\($\n\s*\)\+\%$//]], -- trim last line
[[%s/\%^\n\+//]], -- trim first line
},
})
require('leap').set_default_keymaps()
require('Comment').setup()
require("nvim-tree").setup({
sort_by = "case_sensitive",
sync_root_with_cwd = true,
update_focused_file = {
update_root = true,
},
view = {
adaptive_size = true,
mappings = {
list = {
{key = "cd", action = "cd"}
}
},
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = true,
},
})
vim.cmd("colorscheme material")
vim.api.nvim_create_autocmd("FileType", { pattern = "make", command = [[set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab]] })
vim.api.nvim_create_autocmd("FileType", { pattern = "vimwiki", command = [[setlocal shiftwidth=2 softtabstop=2 expandtab]] })
vim.api.nvim_create_autocmd("FileType", { pattern = "vimwiki", command = [[setlocal filetype=markdown]] })
vim.api.nvim_create_autocmd("FileType", { pattern = "javascript", command = [[setlocal shiftwidth=2 softtabstop=2 expandtab]] })
vim.api.nvim_create_autocmd("FileType", { pattern = "vue", command = [[setlocal shiftwidth=2 softtabstop=2 expandtab]] })