Adding line numbers, autoformat on save
This commit is contained in:
committed by
Ian Roddis
parent
fcf108c4df
commit
0114acb47b
@@ -318,6 +318,7 @@ vim.opt.hlsearch = false
|
|||||||
vim.opt.smartcase = true
|
vim.opt.smartcase = true
|
||||||
|
|
||||||
-- Display
|
-- Display
|
||||||
|
vim.opt.nu = true
|
||||||
vim.opt.wrap = false
|
vim.opt.wrap = false
|
||||||
vim.opt.termguicolors = false
|
vim.opt.termguicolors = false
|
||||||
vim.opt.scrolloff = 8
|
vim.opt.scrolloff = 8
|
||||||
@@ -398,9 +399,6 @@ vim.api.nvim_create_autocmd('FileType', {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set('n', 'ga', ':EasyAlign')
|
|
||||||
vim.keymap.set('v', 'ga', ':EasyAlign')
|
|
||||||
|
|
||||||
-- [[ Highlight on yank ]]
|
-- [[ Highlight on yank ]]
|
||||||
-- See `:help vim.highlight.on_yank()`
|
-- See `:help vim.highlight.on_yank()`
|
||||||
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
|
||||||
@@ -807,7 +805,8 @@ vim.api.nvim_set_hl(0, "Matchadd_4", { bg = colors.red, fg = 0 })
|
|||||||
vim.api.nvim_set_hl(0, "Matchadd_5", { bg = colors.orange, fg = 0 })
|
vim.api.nvim_set_hl(0, "Matchadd_5", { bg = colors.orange, fg = 0 })
|
||||||
vim.api.nvim_set_hl(0, "Matchadd_6", { bg = colors.yellow, fg = 0 })
|
vim.api.nvim_set_hl(0, "Matchadd_6", { bg = colors.yellow, fg = 0 })
|
||||||
|
|
||||||
|
-- Automatically format
|
||||||
|
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
|||||||
Reference in New Issue
Block a user