|
|
@ -13,96 +13,112 @@ extension = {
|
|
|
|
nim = 'nim',
|
|
|
|
nim = 'nim',
|
|
|
|
py = 'python',
|
|
|
|
py = 'python',
|
|
|
|
tex = 'tex',
|
|
|
|
tex = 'tex',
|
|
|
|
}})
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- delete trailing whitespaces on save
|
|
|
|
-- delete trailing whitespaces on save
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufWritePre' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufWritePre' },
|
|
|
|
{pattern = {'*'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { '*' },
|
|
|
|
command = [[%s/\s\+$//e]],
|
|
|
|
command = [[%s/\s\+$//e]],
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- settings for filetype: c
|
|
|
|
-- settings for filetype: c
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
|
|
|
{pattern = {'c'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'c' },
|
|
|
|
command = '!cclear'
|
|
|
|
command = '!cclear'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
{pattern = {'c'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'c' },
|
|
|
|
command = 'set colorcolumn=80'
|
|
|
|
command = 'set colorcolumn=80'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- settings for filetype: java
|
|
|
|
-- settings for filetype: java
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'FileType' },
|
|
|
|
{pattern = {'java'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'java' },
|
|
|
|
command = 'setlocal shiftwidth=2 softtabstop=2',
|
|
|
|
command = 'setlocal shiftwidth=2 softtabstop=2',
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
{pattern = {'java'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'java' },
|
|
|
|
command = 'set colorcolumn=100'
|
|
|
|
command = 'set colorcolumn=100'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- settings for filetype: javascript
|
|
|
|
-- settings for filetype: javascript
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'FileType' },
|
|
|
|
{pattern = {'javascript'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'javascript' },
|
|
|
|
command = 'setlocal shiftwidth=2 softtabstop=2',
|
|
|
|
command = 'setlocal shiftwidth=2 softtabstop=2',
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- settings for filetype: lua
|
|
|
|
-- settings for filetype: lua
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'FileType' },
|
|
|
|
{pattern = {'lua'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'lua' },
|
|
|
|
command = 'setlocal shiftwidth=2 softtabstop=2',
|
|
|
|
command = 'setlocal shiftwidth=2 softtabstop=2',
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
{pattern = {'lua'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'lua' },
|
|
|
|
command = 'set colorcolumn=100'
|
|
|
|
command = 'set colorcolumn=100'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- settings for filetype: markdown
|
|
|
|
-- settings for filetype: markdown
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'FileType' },
|
|
|
|
{pattern = {'markdown'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'markdown' },
|
|
|
|
command = 'setlocal shiftwidth=2 softtabstop=2',
|
|
|
|
command = 'setlocal shiftwidth=2 softtabstop=2',
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
{pattern = {'markdown'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'markdown' },
|
|
|
|
command = 'set colorcolumn=100'
|
|
|
|
command = 'set colorcolumn=100'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
{pattern = {'markdown'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'markdown' },
|
|
|
|
command = 'set conceallevel=2'
|
|
|
|
command = 'set conceallevel=2'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- settings for filetype: nim
|
|
|
|
-- settings for filetype: nim
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
{pattern = {'nim'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'nim' },
|
|
|
|
command = 'set colorcolumn=80'
|
|
|
|
command = 'set colorcolumn=80'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- settings for filetype: python
|
|
|
|
-- settings for filetype: python
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
{pattern = {'python'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'python' },
|
|
|
|
command = 'set colorcolumn=80'
|
|
|
|
command = 'set colorcolumn=80'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
-- settings for filetype: tex
|
|
|
|
-- settings for filetype: tex
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
|
|
|
{pattern = {'tex'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'tex' },
|
|
|
|
command = '!texclear %'
|
|
|
|
command = '!texclear %'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
|
|
|
|
{pattern = {'tex'},
|
|
|
|
{
|
|
|
|
|
|
|
|
pattern = { 'tex' },
|
|
|
|
command = 'set colorcolumn=80'
|
|
|
|
command = 'set colorcolumn=80'
|
|
|
|
})
|
|
|
|
})
|
|
|
|