48 lines
1.0 KiB
Lua
48 lines
1.0 KiB
Lua
-- Options
|
|
vim.opt.number = true
|
|
vim.opt.relativenumber = true
|
|
vim.opt.mouse = ''
|
|
vim.opt.showmode = false
|
|
|
|
vim.schedule(function()
|
|
vim.opt.clipboard = 'unnamedplus'
|
|
end)
|
|
|
|
vim.opt.breakindent = true
|
|
vim.opt.undofile = true
|
|
vim.opt.ignorecase = true
|
|
vim.opt.smartcase = true
|
|
vim.opt.signcolumn = 'yes'
|
|
vim.opt.updatetime = 250
|
|
vim.opt.timeoutlen = 300
|
|
|
|
-- Enable inline diagnostics
|
|
vim.diagnostic.config {
|
|
virtual_text = {
|
|
prefix = '●',
|
|
source = 'always',
|
|
},
|
|
signs = true,
|
|
underline = true,
|
|
update_in_insert = false,
|
|
severity_sort = true,
|
|
}
|
|
|
|
vim.opt.splitright = true
|
|
vim.opt.splitbelow = true
|
|
vim.opt.list = false
|
|
vim.opt.inccommand = 'split'
|
|
vim.opt.cursorline = true
|
|
vim.opt.scrolloff = 10
|
|
|
|
-- Set indentation for specific filetypes
|
|
vim.api.nvim_create_autocmd('FileType', {
|
|
pattern = { 'typescript', 'javascript', 'typescriptreact', 'javascriptreact', 'html', 'css' },
|
|
callback = function()
|
|
vim.opt_local.tabstop = 2
|
|
vim.opt_local.shiftwidth = 2
|
|
vim.opt_local.expandtab = true
|
|
end,
|
|
})
|
|
|