require('plugins') vim.g.netrw_liststyle = 3 -- Use number column vim.opt.number = true -- Color column for 80 characters vim.opt.cc = "80" -- REMAPS -- -- Use ; in place of : in normal mode vim.keymap.set('n', ';', ':') -- Remap navigation between windows vim.keymap.set('n', '', '') vim.keymap.set('n', '', '') vim.keymap.set('n', '', '') vim.keymap.set('n', '', '') -- Map copy to system clipboard to vim.keymap.set('', '', '"+y') -- coc.nvim - remap to make it confirm completion. vim.keymap.set('i', '', function() if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#confirm']() end return '' end, { expr=true }) -- coc.nvim - use / to navigate completion list vim.keymap.set('i', '', function() if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#next'](1) end return '' end, { expr=true }) vim.keymap.set('i', '', function() if vim.fn['coc#pum#visible']() == 1 then return vim.fn['coc#pum#prev'](1) end return '' end, { expr=true }) -- Code search? https://news.ycombinator.com/item?id=41739452 vim.keymap.set('n', 'gv', 'vlua vim.lsp.buf.definition()', opts) -- Tab stuff vim.opt.shiftwidth = 2 vim.opt.softtabstop = 2 vim.opt.tabstop = 2 vim.opt.expandtab = true -- set filetype for void-packages templates vim.api.nvim_create_autocmd( { "BufRead", "BufNewFile" }, { pattern = { "template" }, command = "setlocal filetype=sh" } ) -- treesitter require'nvim-treesitter.configs'.setup { highlight = { enable = true, -- Setting this to true will run `:h syntax` and tree-sitter at the same time. -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). -- Using this option may slow down your editor, and you may see some duplicate highlights. -- Instead of true it can also be a list of languages additional_vim_regex_highlighting = false, }, indent = { enable = true } } -- Install coc extensions vim.g.coc_global_extensions = {'coc-json', 'coc-lua', 'coc-pyright', 'coc-rust-analyzer', 'coc-yaml', 'coc-eslint'} -- Turn on nice things vim.opt.clipboard = "unnamedplus" vim.opt.mouse = "a" -- Colorscheme vim.opt.termguicolors = true vim.o.background = "light" vim.g.gruvbox_contrast_light = "medium" vim.g.gruvbox_italicize_comments = 0 vim.cmd([[colorscheme gruvbox]])