repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: setup nvim-cmp autocomplete

00fd0a422cd6e2d0faf8b39f31c67a82c5d6cc14

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (4)

neovim/lua/general_editor_settings.lua

Modified
82 82 vim.opt.undodir = data_path .. '/undo/'
83 83 -- ask me to force failed commands
84 84 vim.opt.confirm = true
85 - vim.opt.completeopt = { 'menuone', 'noinsert', 'noselect' }
85 + vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
86 86 -- avoid showing messages during automomplete
87 87 vim.opt.shortmess:append 'c'
88 88 -- open splits below and to the right of current buffers

neovim/lua/lsp.lua

Modified
18 18 mapping = {
19 19 ['<C-d>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
20 20 ['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
21 - ['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
21 + ['<C-n>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
22 22 ['<C-y>'] = cmp.config.disable,
23 23 ['<C-e>'] = cmp.mapping {
24 24 i = cmp.mapping.abort(),
90 90 local integrate_into_neovim = function(client, buffer_number)
91 91 print('LSP ' .. client.name .. ' [' .. client.id .. '] ' .. 'started.')
93 - -- Configure diagnostics to only show up on file save
93 + -- Configure diagnostics to only show up when not typing
94 94 vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
95 95 signs = true,
96 96 underline = false,
97 97 virtual_text = false,
98 - -- FIXME these options are not merged yet
99 - --[[ show_diagnostic_autocmds = { "BufWritePost" },
100 - diagnostic_delay = 500, ]]
101 - -- TODO
102 - -- * clear diagnostics on enter i
98 + update_in_insert = false,
99 + severity_sort = true,
104 101 local keys = require 'which-key'
105 102 keys.register(keybinds_in_lsp_context, {

neovim/lua/plugins.lua

Modified
158 + local cheatsheet = require'cheatsheet'.print
159 + cheatsheet[[]]
160 + cheatsheet[[ALT+. => Goto previous usage]]
161 + cheatsheet[[ALT+, => Goto next usage]]
162 + cheatsheet[[CTRL+UP => Expand selection]]
163 + cheatsheet[[CTRL+DOWN => Decrease selection]]
164 + cheatsheet[[]]
245 252 'RishabhRD/nvim-lsputils',
246 253 -- Show outline view based on LSP
247 254 'simrat39/symbols-outline.nvim',
255 + asdf

wezterm/wezterm.lua

Modified
1 1 local wez = require'wezterm'
2 2 return {
3 - font = wez.font'BlexMono NF',
4 - font_size = 16.0,
3 + font = wez.font'JetBrainsMono Nerd Font',
4 + font_size = 13.0,
5 5 color_scheme = 'nord',
6 6 default_prog = {'nu'},
7 7 window_decorations = 'RESIZE',
11 11 window_padding = {
12 12 left = 8,
13 13 right = 8,
14 - top = 0,
15 - bottom = 0,
14 + top = 4,
15 + bottom = 4,
17 17 colors = {
18 18 tab_bar = {