diff options
| author | Martin Fischer <martin@push-f.com> | 2026-10-10 12:25:43 +0200 |
|---|---|---|
| committer | Martin Fischer <martin@push-f.com> | 2026-10-10 19:54:55 +0200 |
| commit | b657343b58adb1d4a8ab7f648c9683c4b1d67128 (patch) | |
| tree | d090705d544c619ba015058b1535d38bc15787ae /user/nvim/init.lua | |
| parent | d51c60c30e7f67e644db0bc5eadea9f0392481ca (diff) | |
tweak(workstation): use neovim instead of vim
Diffstat (limited to 'user/nvim/init.lua')
| -rw-r--r-- | user/nvim/init.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/user/nvim/init.lua b/user/nvim/init.lua new file mode 100644 index 0000000..2874c1d --- /dev/null +++ b/user/nvim/init.lua @@ -0,0 +1,32 @@ +-- Don't break words in the middle. +vim.opt.linebreak = true + +-- Use the system clipboard. +vim.opt.clipboard = "unnamedplus" + +-- Ignore case in search unless the pattern contains uppercase. +vim.opt.ignorecase = true +vim.opt.smartcase = true + +-- Color scheme +require('vscode').setup({ + -- Enable transparent background. + transparent = true, +}) +vim.cmd.colorscheme "vscode" + +-- File picker +local pick = require('mini.pick') +-- Disable icons in mini.pick (my font doesn't have them). +pick.setup({ source = { show = pick.default_show } }) +-- Reuse Neovim's popup-menu selection color for mini.pick's selected item. +vim.api.nvim_set_hl(0, 'MiniPickMatchCurrent', { link = 'PmenuSel' }) + +-- Keyboard shortcuts + +-- Clear search highlighting with Escape. +vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>', { desc = 'Clear search highlight' }) + +vim.keymap.set('n', '<C-p>', function() + pick.builtin.files() +end, { desc = 'Pick files' }) |
