X-Git-Url: https://git.r.bdr.sh/rbdr/dotfiles/blobdiff_plain/9603dc4bd113317d57643c269f3dff0076247116..d2a7e4bae9917821c37d62add7b58ef0b8efc467:/config/nvim/init.lua diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 994ebef..e1e61f6 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -5,11 +5,12 @@ vim.opt.number = true -- Show number column vim.opt.wrap = false -- Don't wrap text vim.opt.list = true -- Display tabs and trailing space +vim.opt.cursorline = true -- Highlight cursor line vim.opt.colorcolumn='80,150' -- Show color columns -- Color vim.opt.termguicolors = true -vim.cmd.color('rbdr') +vim.cmd.color('tranquil') -- Tab Style (Always override with editorconfig) vim.opt.tabstop = 2 -- 2 Spaces per tab @@ -26,7 +27,6 @@ vim.opt.smartcase = true -- Unless we use both cases in searc -- Autocomplete Behavior vim.opt.wildmode = 'list:longest,list:full' -- Autocomplete common matching string - -- first, and then the full match. -- Folding Behavior vim.opt.foldmethod = 'syntax' -- Use syntax highlight to define folds @@ -55,6 +55,12 @@ vim.keymap.set('i', '', ':m .-2==gi') vim.keymap.set('v', '', ':m \'>+1gv=gv') vim.keymap.set('v', '', ':m \'<-2gv=gv') +-- Navigate the location list +vim.keymap.set('n', '', ':lnext') +vim.keymap.set('n', '', ':lprev') +vim.keymap.set('n', '', ':cnext') +vim.keymap.set('n', '', ':cprev') + ------------------------------------------------------------------------------- -- File Specific Behavior ------------------------------------------------------------------------------- @@ -70,6 +76,11 @@ vim.api.nvim_create_autocmd({'BufNewFile', 'BufRead'}, { callback = function () vim.opt.filetype = 'snes' end }) +vim.api.nvim_create_autocmd({'BufNewFile', 'BufRead'}, { + pattern = {'.plan'}, + callback = function () vim.opt.filetype = 'markdown' end +}) + ------------------------------------------------------------------------------- -- Local Overrides ------------------------------------------------------------------------------- @@ -79,48 +90,34 @@ pcall(require, 'init_local') -- Plugin Specific Behavior ------------------------------------------------------------------------------- -- FZF -vim.keymap.set('', '', ':FZF ') -vim.g.fzf_layout = { down = '40%' } -vim.g.fzf_colors = { - fg = {'fg', 'Normal'}, - bg = {'bg', 'Normal'}, - hl = {'fg', 'Comment'}, - ['fg+'] = {'fg', 'CursorLine', 'CursorColumn', 'Normal'}, - ['bg+'] = {'bg', 'CursorLine', 'CursorColumn'}, - ['hl+'] = {'fg', 'Statement'}, - info = {'fg', 'PreProc'}, - border = {'fg', 'Ignore'}, - prompt = {'fg', 'Conditional'}, - pointer = {'fg', 'Exception'}, - marker = {'fg', 'Keyword'}, - spinner = {'fg', 'Label'}, - header = {'fg', 'Comment'} -} +vim.keymap.set('n', '', + "lua require('fzf-lua').files({ fzf_opts = {} })", { silent = true }) +-- Toggle Autosave +vim.api.nvim_set_keymap('n', 'n', ':ASToggle', {}) -- Svelte Config vim.g.vim_svelte_plugin_use_typescript = true --- Limelight / Goyo config - -vim.g.limelight_conceal_ctermfg = 'gray' -vim.g.limelight_conceal_guifg = 'DarkGray' +-- Coq +vim.g.coq_settings = { + auto_start = 'shut-up', + clients = { + snippets = { + warn = {} + } + } +} -vim.api.nvim_create_autocmd({'User'}, { - pattern = 'GoyoEnter', - command = 'Limelight' -}) -vim.api.nvim_create_autocmd({'User'}, { - pattern = 'GoyoLeave', - command = 'Limelight!' -}) +-- Oil +vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" }) -vim.keymap.set('n', 'i', ':Limelight!!==') -vim.keymap.set('i', 'i', ':Limelight!!==gi') -vim.keymap.set('v', 'i', ':Limelight!!gv=gv') -vim.keymap.set('n', 'g', ':Goyo==') -vim.keymap.set('i', 'g', ':Goyo==gi') -vim.keymap.set('v', 'g', ':Goyogv=gv') +-- UndoTree +vim.keymap.set('n', 'U', vim.cmd.UndotreeToggle) -- Plugins require('plugins') +require('treesitter_config') +require('lsp') +require('dap_config') +require('calendar_tools')