diff --git a/.config/newsboat/config b/.config/newsboat/config index 04b0d63..4cab426 100755 --- a/.config/newsboat/config +++ b/.config/newsboat/config @@ -1,6 +1,7 @@ #show-read-feeds no auto-reload yes prepopulate-query-feeds yes +confirm-mark-feed-read no external-url-viewer "urlscan -dc -r 'linkhandler {}'" diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index c4fdee7..0cdecfa 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -92,12 +92,48 @@ cmp.setup({ ghost_text = true, }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.select_prev_item(cmp_select), - [''] = cmp.mapping.select_next_item(cmp_select), - [''] = cmp.mapping.confirm({ select = true }), - [''] = cmp.mapping.complete(), - }), + -- mapping = cmp.mapping.preset.insert({ + -- [''] = cmp.mapping.select_prev_item(cmp_select), + -- [''] = cmp.mapping.select_next_item(cmp_select), + -- [''] = cmp.mapping.confirm({ select = true }), + -- [''] = cmp.mapping.complete(), + -- }), + mapping = { + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + if #cmp.get_entries() == 1 then + cmp.confirm({ select = true }) + else + cmp.select_next_item() + end + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + if #cmp.get_entries() == 1 then + cmp.confirm({ select = true }) + end + else + fallback() -- The fallback function sends a already mapped key. In this case, it's probably ``. + end + end, { "i", "s" }), + + [""] = cmp.mapping(function() + if cmp.visible() then + if #cmp.get_entries() == 1 then + cmp.confirm({ select = true }) + else + cmp.select_prev_item() + end + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + [''] = cmp.mapping.confirm({select = true }), + [''] = cmp.mapping.abort(), + }, snippet = { expand = function(args) diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc index 0b71fdf..8193b51 100755 --- a/.config/shell/aliasrc +++ b/.config/shell/aliasrc @@ -50,4 +50,3 @@ alias \ ixpe="cd /home/tibeuleu/IXPE_analysis/Code && clear && ls" \ foc="cd /home/tibeuleu/FOC_reduction/Code && clear && ls" \ config='/usr/bin/git --git-dir=/home/tibeuleu/.cfg/ --work-tree=/home/tibeuleu' \ -