mirror of https://github.com/zpl-zak/nvimrc
71 lines
1.5 KiB
Lua
71 lines
1.5 KiB
Lua
-- [[ Setting options ]]
|
|
-- See `:help vim.o`
|
|
|
|
-- Set highlight on search
|
|
vim.o.hlsearch = false
|
|
vim.o.incsearch = true
|
|
|
|
-- Make line numbers default
|
|
vim.wo.number = true
|
|
vim.o.guicursor = ""
|
|
vim.o.nu = true
|
|
vim.o.relativenumber = true
|
|
|
|
-- Enable mouse mode
|
|
vim.o.mouse = 'a'
|
|
|
|
-- Sync clipboard between OS and Neovim.
|
|
vim.o.clipboard = 'unnamedplus'
|
|
|
|
-- Enable break indent
|
|
vim.o.breakindent = true
|
|
|
|
-- disable text wrap
|
|
vim.o.wrap = false
|
|
|
|
-- Save undo history
|
|
vim.o.swapfile = false
|
|
vim.o.backup = false
|
|
vim.o.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
|
vim.o.undofile = true
|
|
|
|
-- Case insensitive searching UNLESS /C or capital in search
|
|
vim.o.ignorecase = true
|
|
vim.o.smartcase = true
|
|
|
|
-- Keep signcolumn on by default
|
|
vim.wo.signcolumn = 'yes'
|
|
|
|
-- Set update time
|
|
vim.o.updatetime = 50
|
|
vim.o.timeout = true
|
|
vim.o.timeoutlen = 300
|
|
|
|
-- Set completeopt to have a better completion experience
|
|
vim.o.completeopt = 'menuone,noselect'
|
|
|
|
-- NOTE: You should make sure your terminal supports this
|
|
vim.o.termguicolors = true
|
|
|
|
vim.o.scrolloff = 8
|
|
vim.o.signcolumn = "yes"
|
|
vim.opt.isfname:append("@-@")
|
|
vim.o.colorcolumn = "80"
|
|
|
|
-- indent setup
|
|
vim.o.list = false
|
|
vim.opt.listchars:append "eol: "
|
|
vim.o.smartindent = true
|
|
|
|
vim.cmd([[ set shellcmdflag=-c ]])
|
|
|
|
-- Restore cursor position
|
|
vim.api.nvim_create_autocmd({ "BufReadPost" }, {
|
|
pattern = { "*" },
|
|
callback = function()
|
|
vim.api.nvim_exec('silent! normal! g`"zv', false)
|
|
end,
|
|
})
|
|
|
|
vim.filetype.add({extension = {wgsl = "wgsl"}})
|