neovim/lua/config/options.lua

93 lines
2.0 KiB
Lua

-- grabs key mappings
require("keymap")
-- prevent cursor override
vim.cmd('set guicursor=')
vim.cmd('let g:do_filetype_lua=1')
-- basic settings
vim.cmd('filetype plugin indent on')
vim.cmd('set ts=4 sts=4 sw=4 expandtab')
-- clipboard
vim.cmd('set clipboard+=unnamedplus')
-- hybrid numbering
vim.opt.relativenumber = true
vim.opt.number = true
vim.opt.cursorline = true
vim.opt.compatible = false
-- ignores search case unless capital is used
vim.opt.smartcase = true
vim.opt.hlsearch = true
-- defaults to transparent
Transparent = true
-- timeouts
vim.opt.ttimeout = true
vim.opt.ttimeoutlen = 100
vim.o.updatetime = 250
-- nvim tree basics
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- vimwiki changes
vim.cmd([[
let g:vimwiki_list = [{'path': '~/vimwiki/',
\ 'syntax': 'markdown', 'ext':'.md'}]
]])
-- go file settings
vim.g.go_hightlight_types = 1
vim.g.go_hightlight_fields = 1
vim.g.go_hightlight_functions = 1
vim.g.go_hightlight_function_calls = 1
vim.g.go_hightlight_operators = 1
vim.g.go_hightlight_extra_types = 1
-- airline settings
if vim.g.airline_symbols == nil then
vim.g.airline_symbols = vim.empty_dict()
end
vim.g.airline_powerline_fonts = 1
vim.g.airline_symbols.linenr = ''
vim.g.airline_symbols.maxlinenr = ''
vim.g.airline_symbols.dirty = ''
-- vimtex settings
vim.g.vimtex_view_method = 'zathura'
vim.cmd([[
let g:vimtex_quickfix_ignore_filters = [
\ 'Citation',
\ 'Font Warning',
\]
]])
-- sets autocommands for bufenters etc -> NOT DOING pattern should be faster?
-- calcurse -> markdown
-- vim.api.nvim_create_autocmd({"BufRead","BufNewFile"}, {
-- pattern = {"/tmp/calcurse*","~/.local/share/calcurse/notes/*"},
-- command = "set filetype=markdown",
-- })
-- sets fileypes for those that are not auto recognized
-- sway config
vim.filetype.add({
pattern = {
['.*/sway/.*'] = 'swayconfig',
},
})
-- calcurse notes as markdown
vim.filetype.add({
pattern = {
['/tmp/calcurse.*;.*/calcurse/notes/.*'] = 'markdown',
},
})