summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2025-02-05 20:42:09 -0500
committerAndrew Opalach <andrew@akon.city> 2025-02-05 20:42:09 -0500
commit8be9ca2624d39d0bf0931b585507741169ca5f9f (patch)
tree77b94ae4fde8d5c0c013b37854e4aad78fc55b47 /files
parenta135ec293eab8e7c9e5f581dc70cd5cf2bea587a (diff)
downloaddotfiles-8be9ca2624d39d0bf0931b585507741169ca5f9f.tar.gz
dotfiles-8be9ca2624d39d0bf0931b585507741169ca5f9f.tar.bz2
dotfiles-8be9ca2624d39d0bf0931b585507741169ca5f9f.zip
Nvim config, umu input -> pkgs.umu-launcher
Diffstat (limited to 'files')
-rw-r--r--files/nvim/init.vim36
1 files changed, 25 insertions, 11 deletions
diff --git a/files/nvim/init.vim b/files/nvim/init.vim
index e304e94..e679f4d 100644
--- a/files/nvim/init.vim
+++ b/files/nvim/init.vim
@@ -58,7 +58,7 @@ set ssop=skiprtp,blank,buffers,folds,winsize,terminal
set vop-=curdir
let view_dir = expand('~/c/sessions/views')
if !isdirectory(view_dir)
- call mkdir(view_dir, "p", 0700)
+ call mkdir(view_dir, 'p', 0700)
endif
let &viewdir=view_dir
@@ -73,10 +73,10 @@ set backup
" Swap file directory.
set directory=~/c/sessions/swaps//
-if has("persistent_undo")
+if has('persistent_undo')
let undo_dir = expand('~/c/sessions/undo')
if !isdirectory(undo_dir)
- call mkdir(undo_dir, "p", 0700)
+ call mkdir(undo_dir, 'p', 0700)
endif
let &undodir=undo_dir
set undofile
@@ -87,7 +87,7 @@ set termguicolors
colo wal-gui
" Cursor blink.
-set guicursor=a:blinkon1
+"set guicursor=a:blinkon1
" Highlight whitespace.
au BufEnter * match ExtraWhitespace /\s\+$/
@@ -111,7 +111,7 @@ let g:fzf_colors = {
\'header': ['fg', 'Type']
\}
let g:fzf_preview_window = ['right,47%']
-let g:fzf_layout = { 'window': { 'width': 0.70, 'height': 0.50 } }
+let g:fzf_layout = { 'window': { 'width': 0.75, 'height': 0.60 } }
function! StatuslineMode() abort
if mode() == nr2char(22)
@@ -185,7 +185,7 @@ if os.getenv('NIX_SHELL') ~= nil then
}
})
lsp.ruff.setup({})
- require("inc_rename").setup({})
+ require('inc_rename').setup({})
end
-- Try to make treesitter suck less.
@@ -211,13 +211,14 @@ require('mini.sessions').setup({
require('mini.completion').setup({})
-- Disable icons in diffview.
-require("diffview").setup({
+require('diffview').setup({
diff_binaries = false,
use_icons = false
})
-- Don't use tabs in Neogit.
require('neogit').setup({
+ disable_hint = true,
kind = 'vsplit',
commit_editor = { kind = 'split' },
commit_select_view = { kind = 'vsplit' },
@@ -229,13 +230,19 @@ require('neogit').setup({
refs_view = { kind = 'split' },
-- Allow basic movement in Neogit without mapping conflicts.
mappings = {
- popup = { ["l"] = false, ["L"] = "LogPopup" },
- status = { ["$"] = false, ["#"] = "CommandHistory" }
+ popup = { ['l'] = false, ['L'] = 'LogPopup' },
+ status = { ['$'] = false, ['#'] = 'CommandHistory' }
}
})
-- Preview colors in #<hex> format.
-require('ccc').setup({ highlighter = { auto_enable = true, lsp = true } })
+require('ccc').setup({ highlighter = { auto_enable = false, lsp = true } })
+
+--require("perfanno").setup({
+-- telescope = {
+-- enabled = false,
+-- },
+--})
-- Make shift + nav keys no-ops.
vim.keymap.set('n', 'H', '<nop>', { silent = true })
@@ -273,7 +280,7 @@ vim.keymap.set('i', '<Down>', [[pumvisible() ? '<C-n>' : '<Down>']], { expr = tr
-- Lsp Binds.
vim.keymap.set('n', '<C-d>', '<C-]>', {})
vim.keymap.set('n', '<C-n>', function()
- return ":IncRename " .. vim.fn.expand("<cword>")
+ return ':IncRename ' .. vim.fn.expand('<cword>')
end, { expr = true })
-- Fzf binds.
vim.keymap.set('n', '\\', [[:Buffers<CR>]], { silent = true })
@@ -298,6 +305,13 @@ command! -bang -nargs=* GGrep
\ 'git grep --line-number -- '.fzf#shellescape(<q-args>),
\ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)
+" https://vim.fandom.com/wiki/Replace_a_builtin_command_using_cabbrev
+function! CommandCabbr(abbreviation, expansion)
+ execute 'cabbr ' . a:abbreviation . ' <C-R>=getcmdpos() == 1 && getcmdtype() == ":" ? "' . a:expansion . '" : "' . a:abbreviation . '"<CR>'
+endfunction
+command! -nargs=+ CommandCabbr call CommandCabbr(<f-args>)
+CommandCabbr no nohlsearch
+
call Juliana#Init() " Custom insert mode tab behavior inherited from Emacs.
inoremap <silent><Tab> <C-R>=Juliana#CompleteTab('START')<CR>
\<C-R>=Juliana#CompleteTab('TAB')<CR>