nvim: remove wilder.nvim + reorder cmp's sources
This commit is contained in:
parent
c892d5657a
commit
17038fb5fc
|
@ -4,6 +4,12 @@ This is the continuation of [my old dotfiles](https://git.disroot.org/FollieHiyu
|
|||
|
||||
Managed with `ansible`.
|
||||
|
||||
### 🧰 Setup
|
||||
|
||||
```bash
|
||||
ansible-playbook -i hosts dotfiles.yml
|
||||
```
|
||||
|
||||
### 📓 Notes
|
||||
|
||||
I use Alpine-edge aka. the best binary distro on Earth 😃. Therefore some tasks won't work on other distros (eg. `apk` tasks)
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
|
||||
# login-shell=no
|
||||
|
||||
# app-id=foot
|
||||
# title=foot
|
||||
# locked-title=no
|
||||
|
||||
font={{ term_font }}:style=Regular:size={{ font_size }}, {{ cjk_font }}:style=Regular:size={{ font_size }}
|
||||
font-bold={{ term_font }}:style=Bold:size={{ font_size }}, {{ cjk_font }}:style=Bold:size={{ font_size }}
|
||||
font-italic={{ term_font }}:style=Italic:size={{ font_size }}, {{ cjk_font }}:style=Italic:size={{ font_size }}
|
||||
|
@ -16,7 +20,7 @@ font-bold-italic={{ term_font }}:style=Bold Italic:size={{ font_size }}, {{ cjk_
|
|||
# box-drawings-uses-font-glyphs=no
|
||||
dpi-aware=no
|
||||
|
||||
initial-window-size-pixels=800x600 # Or,
|
||||
# initial-window-size-pixels=800x600 # Or,
|
||||
# initial-window-size-chars=<COLSxROWS>
|
||||
# initial-window-mode=windowed
|
||||
# pad=2x2 # optionally append 'center'
|
||||
|
@ -47,6 +51,7 @@ lines=10000
|
|||
# label-letters=sadfjklewcmpgh
|
||||
# osc8-underline=url-mode
|
||||
# protocols = http, https, ftp, ftps, file, gemini, gopher
|
||||
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'
|
||||
|
||||
[cursor]
|
||||
# style=block
|
||||
|
@ -63,6 +68,7 @@ hide-when-typing=yes
|
|||
alpha=1.0
|
||||
foreground={{ foreground | regex_replace('^#', '') }}
|
||||
background={{ background | regex_replace('^#', '') }}
|
||||
|
||||
regular0={{ color0 | regex_replace('^#', '') }}
|
||||
regular1={{ color1 | regex_replace('^#', '') }}
|
||||
regular2={{ color2 | regex_replace('^#', '') }}
|
||||
|
@ -71,6 +77,7 @@ regular4={{ color4 | regex_replace('^#', '') }}
|
|||
regular5={{ color5 | regex_replace('^#', '') }}
|
||||
regular6={{ color6 | regex_replace('^#', '') }}
|
||||
regular7={{ color7 | regex_replace('^#', '') }}
|
||||
|
||||
bright0={{ color8 | regex_replace('^#', '') }}
|
||||
bright1={{ color9 | regex_replace('^#', '') }}
|
||||
bright2={{ color10 | regex_replace('^#', '') }}
|
||||
|
@ -84,6 +91,7 @@ bright7={{ color15 | regex_replace('^#', '') }}
|
|||
# selection-background=<inverse foreground/background>
|
||||
# jump-labels=<regular0> <regular3>
|
||||
# urls=<regular3>
|
||||
# scrollback-indicator=<regular0> <bright4>
|
||||
|
||||
[csd]
|
||||
# preferred=server
|
||||
|
@ -112,10 +120,10 @@ bright7={{ color15 | regex_replace('^#', '') }}
|
|||
# spawn-terminal=Control+Shift+N
|
||||
# minimize=none
|
||||
# maximize=none
|
||||
fullscreen=F11
|
||||
pipe-visible=[sh -c "xurls | wofi -d -i | xargs -r {{ default_browser }}"] none
|
||||
pipe-scrollback=[sh -c "xurls | wofi -d -i | xargs -r {{ default_browser }}"] none
|
||||
pipe-selected=[xargs -r {{ default_browser }}] none
|
||||
# fullscreen=F11
|
||||
# pipe-visible=[sh -c "xurls | wofi -d -i | xargs -r {{ default_browser }}"] none
|
||||
# pipe-scrollback=[sh -c "xurls | wofi -d -i | xargs -r {{ default_browser }}"] none
|
||||
# pipe-selected=[xargs -r {{ default_browser }}] none
|
||||
# show-urls-launch=Control+Shift+u
|
||||
# show-urls-copy=none
|
||||
|
||||
|
|
|
@ -56,15 +56,15 @@ function M.cmp_conf()
|
|||
|
||||
vim_item.menu = ({
|
||||
luasnip = '[SNIP]',
|
||||
path = '[PATH]',
|
||||
buffer = '[BUF]',
|
||||
calc = '[CALC]',
|
||||
dictionary = '[DICT]',
|
||||
nvim_lsp = '[LSP]',
|
||||
conjure = '[CJ]',
|
||||
orgmode = '[ORG]',
|
||||
-- cmp_tabnine = '[TN]',
|
||||
latex_symbols = '[TEX]',
|
||||
conjure = '[CJ]',
|
||||
orgmode = '[ORG]'
|
||||
dictionary = '[DICT]',
|
||||
path = '[PATH]',
|
||||
buffer = '[BUF]',
|
||||
calc = '[CALC]'
|
||||
})[entry.source.name]
|
||||
|
||||
return vim_item
|
||||
|
@ -125,21 +125,20 @@ function M.cmp_conf()
|
|||
},
|
||||
sources = {
|
||||
{name = 'luasnip'},
|
||||
{name = 'path'},
|
||||
{name = 'buffer'},
|
||||
{name = 'calc'},
|
||||
{name = 'dictionary', keyword_length = 2},
|
||||
{name = 'nvim_lsp'},
|
||||
{name = 'conjure'},
|
||||
{name = 'orgmode'},
|
||||
-- {name = 'cmp_tabnine'},
|
||||
{name = 'latex_symbols'},
|
||||
{name = 'conjure'},
|
||||
{name = 'orgmode'}
|
||||
{name = 'dictionary', keyword_length = 2},
|
||||
{name = 'path'},
|
||||
{name = 'buffer'},
|
||||
{name = 'calc'}
|
||||
}
|
||||
}
|
||||
|
||||
-- Setup for cmp-dictionary
|
||||
-- TODO: do this on FileType * (cmp.setup.buffer) with custom dicts
|
||||
-- vim.opt.dictionary = {'/usr/share/dict/words'}
|
||||
vim.g.cmp_dictionary_exact = -1
|
||||
end
|
||||
|
||||
-- function M.tabnine_conf()
|
||||
|
|
|
@ -187,7 +187,7 @@ function M.lsp_conf()
|
|||
'--completion-style=detailed',
|
||||
'--pch-storage=memory',
|
||||
'--header-insertion=iwyu',
|
||||
'--header-insertion=decorators'
|
||||
'--header-insertion-decorators'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -158,51 +158,6 @@ function M.toggleterm_conf()
|
|||
}
|
||||
end
|
||||
|
||||
-- function M.wilder_conf()
|
||||
-- vim.api.nvim_command [[call wilder#setup({'modes': [':', '/', '?']})]]
|
||||
|
||||
-- Doesn't work yet. Bugs in Neovim (see neovim/neovim#14809 and gelguy/wilder.nvim#53)
|
||||
-- so can't do multi-line config inside vim.cmd [[ ]] with \
|
||||
-- vim.api.nvim_command [[
|
||||
-- call wilder#set_option('renderer', wilder#renderer_mux({
|
||||
-- \ ':': wilder#popupmenu_renderer({
|
||||
-- \ 'highlighter': [
|
||||
-- \ wilder#pcre2_highlighter(),
|
||||
-- \ wilder#python_cpsm_highlighter()
|
||||
-- \ ],
|
||||
-- \ 'left': [
|
||||
-- \ ' ',
|
||||
-- \ wilder#popupmenu_devicons(),
|
||||
-- \ wilder#popupmenu_buffer_flags({
|
||||
-- \ 'flags': ' a + ',
|
||||
-- \ 'icons': {'+': '', 'a': '', 'h': ''}
|
||||
-- \ })
|
||||
-- \ ],
|
||||
-- \ 'right': [' ', wilder#popupmenu_scrollbar()]
|
||||
-- \ }),
|
||||
-- \ '/': wilder#wildmenu_renderer({
|
||||
-- \ 'highlighter': wilder#basic_highlighter(),
|
||||
-- \ 'separator': ' · ',
|
||||
-- \ 'right': [' ', wilder#wildmenu_index()]
|
||||
-- \ })
|
||||
-- \ }))
|
||||
-- ]]
|
||||
|
||||
-- vim.api.nvim_command [[
|
||||
-- call wilder#set_option('pipeline', [
|
||||
-- \ wilder#branch(
|
||||
-- \ wilder#python_file_finder_pipeline({
|
||||
-- \ 'file_command': ['fd', '--type', 'f', '--follow', '--hidden', '--exclude', '.git'],
|
||||
-- \ 'dir_command': ['fd', '--type', 'd', '--follow', '--hidden', '--exclude', '.git'],
|
||||
-- \ 'filters': ['cpsm_filter', 'fuzzy_filter']
|
||||
-- \ }),
|
||||
-- \ wilder#cmdline_pipeline({'language': 'python', 'fuzzy': 1, 'set_pcre2_patter': v:true}),
|
||||
-- \ wilder#python_search_pipeline({'pattern': 'fuzzy'})
|
||||
-- \ )
|
||||
-- \ ])
|
||||
-- ]]
|
||||
-- end
|
||||
|
||||
function M.sniprun_conf()
|
||||
local c = require('themes.' .. vim.g.colors_name .. '.colors')
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ local completion = require('modules.completion')
|
|||
local completion_plugins = function(use)
|
||||
use {
|
||||
'hrsh7th/nvim-cmp',
|
||||
event = {'InsertEnter', 'CmdlineEnter'},
|
||||
event = 'InsertEnter',
|
||||
wants = {'LuaSnip', 'cmp-under-comparator'},
|
||||
requires = {
|
||||
{
|
||||
|
@ -299,7 +299,7 @@ local completion_plugins = function(use)
|
|||
use {'hrsh7th/cmp-path', after = 'nvim-cmp'}
|
||||
use {'hrsh7th/cmp-buffer', after = 'nvim-cmp'}
|
||||
use {'hrsh7th/cmp-calc', after = 'nvim-cmp'}
|
||||
use {'uga-rosa/cmp-dictionary', after = 'nvim-cmp'} -- TODO: scripts to curl dicts from aspell.net
|
||||
use {'uga-rosa/cmp-dictionary', after = 'nvim-cmp'}
|
||||
use {'hrsh7th/cmp-nvim-lsp', after = {'nvim-cmp', 'nvim-lspconfig'}}
|
||||
-- use {
|
||||
-- 'tzachar/cmp-tabnine',
|
||||
|
@ -404,14 +404,6 @@ local tools_plugins = function(use)
|
|||
cmd = 'ToggleTerm',
|
||||
config = tools.toggleterm_conf
|
||||
}
|
||||
-- use {
|
||||
-- 'gelguy/wilder.nvim',
|
||||
-- wants = 'cpsm',
|
||||
-- requires = {{'nixprime/cpsm', opt = true}},
|
||||
-- run = ':UpdateRemotePlugins',
|
||||
-- event = 'CmdlineEnter',
|
||||
-- config = tools.wilder_conf
|
||||
-- }
|
||||
use {
|
||||
'michaelb/sniprun',
|
||||
run = 'cargo build --release',
|
||||
|
|
|
@ -74,6 +74,7 @@ function M.load_options()
|
|||
opt.grepprg = 'rg --hidden --vimgrep --smart-case --'
|
||||
opt.diffopt = 'filler,iwhite,internal,algorithm:patience'
|
||||
-- opt.spell = true
|
||||
opt.dictionary = {'/usr/share/dict/american-english'}
|
||||
|
||||
-- Transparency
|
||||
opt.pumblend = 5
|
||||
|
@ -82,7 +83,7 @@ function M.load_options()
|
|||
-- Conceal
|
||||
opt.conceallevel = 2
|
||||
opt.concealcursor = 'niv'
|
||||
-- opt.foldenable = true
|
||||
opt.foldenable = false
|
||||
opt.foldlevelstart = 99
|
||||
|
||||
-- Case insensitive
|
||||
|
|
|
@ -62,7 +62,7 @@ highlight: '#9ca0a4'
|
|||
color0: '#3e4452'
|
||||
color1: '#be5046'
|
||||
color2: '#98c379'
|
||||
color3: '#d19a66'
|
||||
color3: '#e5c07b'
|
||||
color4: '#61afef'
|
||||
color5: '#c678dd'
|
||||
color6: '#56b6c2'
|
||||
|
|
Loading…
Reference in New Issue