You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can confirm that I have no error with a minimal configuration, so it must be some clash with some other plugin.
My init.vim is quite complex, but I can share it if you want to glance at it...
Full `init.vim`
" vim: setsw=4 :setnocompatible" vim, not visetviminfo='50,<1000,s10,:100,/100,h,n~/.config/nvim/backups/viminfofiletypepluginonsyntaxon" Plugin management via https://github.com/junegunn/vim-plug"" my leader is ,let mapleader =","" this is the default `\`" let maplocalleader = ",""callplug#begin('~/.config/nvim/plugged')
" Heredoc highlightingletg:vimsyn_embed='lPr'" support embedded lua, python and ruby"" vim-plug"letg:plug_window='above new'"
Plug 'tpope/vim-repeat'"
Plug 'tpope/vim-surround'"
Plug 'tpope/vim-commentary'"
Plug 'tpope/vim-characterize'"
Plug 'SirVer/ultisnips'letg:UltiSnipsExpandTrigger="<tab>"letg:UltiSnipsJumpForwardTrigger="<tab>"letg:UltiSnipsJumpBackwardTrigger="<c-z>"" If you want :UltiSnipsEdit to split your window.letg:UltiSnipsEditSplit="vertical""" use Plug 'lervag/vimtex', { 'branch': 'feat/context' } to test a branch" use Plug 'lervag/vimtex', { 'branch': 'feat/improve-main-file-detection' }" Plug 'lervag/vimtex', { 'tag': 'v2.15' }
Plug 'lervag/vimtex'letg:tex_flavor='latex'letg:vimtex_fold_enabled=0" this two (especially the last) can create slowdows" read :help vimtex-af-enhanced-matchparen" let g:vimtex_indent_enabled=0" let g:vimtex_motion_matchparen = 0letg:vimtex_matchparen_enabled=0letg:vimtex_quickfix_autoclose_after_keystrokes=5letg:tex_no_error=1" let g:vimtex_complete_img_use_tail=1if (executable("okular"))
letg:vimtex_view_general_viewer='okular'" let g:vimtex_view_general_options = '--unique @pdf\#src:@line@tex'" let g:vimtex_view_general_options_latexmk = '--unique'endif" add pgfscope to the indent keywordletg:vimtex_indent_conditionals= {
\ 'open': '\v%(\\newif)@<!\\if%(field|name|numequal|thenelse|num)@!|\\pgfscope>',
\ 'else': '\\else\>',
\ 'close': '\\fi\>\|\\endpgfscope\>',
\}"" add item-like environmentletg:vimtex_indent_lists= [
\ 'itemize',
\ 'description',
\ 'enumerate',
\ 'compactenum',
\ 'thebibliography',
\ 'multi',
\]""
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'" let g:airline_powerline_fonts = 1if!exists('g:airline_symbols')
letg:airline_symbols= {}
endifletg:airline_theme='light'setlaststatus=2sett_Co=256setttimeoutlen=50" unicode symbolsletg:airline_symbols.crypt ='🔒'" let g:airline_symbols.linenr = '☰'" let g:airline_symbols.linenr = '␊'" let g:airline_symbols.linenr = ''" let g:airline_symbols.linenr = '¶' "this creates havoc" let g:airline_symbols.maxlinenr = ''" let g:airline_symbols.maxlinenr = '㏑'" let g:airline_symbols.branch = '⎇'" let g:airline_symbols.paste = 'ρ'letg:airline_symbols.paste='Þ'" let g:airline_symbols.paste = '∥'letg:airline_symbols.spell='Ꞩ'" let g:airline_symbols.notexists = 'Ɇ'" let g:airline_symbols.whitespace = 'Ξ'" " powerline symbolsletg:airline_left_sep=''" let g:airline_left_alt_sep = ''letg:airline_right_sep=''" let g:airline_right_alt_sep = ''letg:airline_symbols.branch =''letg:airline_symbols.readonly=''letg:airline_symbols.linenr='☰'letg:airline_symbols.maxlinenr =''"letg:airline#extensions#tabline#enabled =1"" generics see https://github.com/vim-airline/vim-airline/issues/1309"letg:airline#parts#ffenc#skip_expected_string='utf-8[unix]'letg:airline#extensions#wordcount#enabled =0""
Plug 'ntpeters/vim-better-whitespace'nnoremap<leader>w :ToggleWhitespace<cr>nnoremap<leader>W :StripWhitespace<cr>letg:better_whitespace_enabled=1"
Plug 'haya14busa/incsearch.vim'letg:incsearch#auto_nohlsearch =1letg:incsearch#separate_highlight =1map/<Plug>(incsearch-forward)map?<Plug>(incsearch-backward)mapg/<Plug>(incsearch-stay)"
Plug 'ervandew/supertab'letg:SuperTabDefaultCompletionType="context"letg:SuperTabContextDefaultCompletionType="<c-x><c-o>""let g:SuperTabRetainCompletionDuration = "session"letg:SuperTabLongestEnhanced=1letg:SuperTabCrMapping=0" augroup Supertab" autocmd!" autocmd FileType text call SuperTabSetDefaultCompletionType("<c-n>")" autocmd FileType tex call SuperTabSetDefaultCompletionType("<c-n>")" augroup END""Plug 'davidhalter/jedi-vim'" "let g:jedi#auto_vim_configuration = 0" autocmd FileType python setlocal completeopt-=preview" let g:jedi#show_call_signatures = "0""
Plug 'jeetsukumaran/vim-markology'"
Plug 'mbbill/undotree'nnoremap<F5>:UndotreeToggle<CR>"
Plug 'junegunn/vim-peekaboo'letg:peekaboo_prefix=",""let g:peekaboo_ins_prefix="<C-S-R>""
Plug 'nvim-tree/nvim-web-devicons'" OPTIONAL: for file icons"" which-keys"
Plug 'folke/which-key.nvim'"" let's see if we can have LSP"
Plug 'williamboman/mason.nvim'
Plug 'williamboman/mason-lspconfig.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'icewind/ltex-client.nvim'"" colorschenes"
Plug 'catppuccin/nvim', { 'as': 'catppuccin' }
Plug 'folke/tokyonight.nvim'
Plug 'chrisbra/Colorizer'letg:colorizer_auto_map=1"<Leader>c"" End Plugins"callplug#end()
"" Plug-ins personalizations"" COLORSCHEME" Error highlighting of "_" is invisible in default colorscheme (white on red!)" adjust spell colors for terminals too" colorscheme github-rsetbackground=light
lua << EOF
--change catpuccin to be a bit more contrasty
require("catppuccin").setup {
color_overrides = {
latte = {
-- base ="#eff1f5",
--blue="#1e66f5",
-- crust ="#dce0e8",
-- flamingo ="#dd7878",
--green="#40a02b",
-- lavender ="#7287fd",
-- mantle ="#e6e9ef",
-- maroon ="#e64553",
-- mauve ="#8839ef",
-- overlay0 ="#9ca0b0",
-- overlay1 ="#8c8fa1",
-- overlay2 ="#7c7f93",
-- peach ="#fe640b",
-- pink ="#ea76cb",
--red="#d20f39",
-- rosewater ="#dc8a78",
-- sapphire ="#209fb5",
-- sky ="#04a5e5",
-- subtext0 ="#6c6f85",
-- subtext1 ="#5c5f77",
-- surface0 ="#ccd0da",
-- surface1 ="#bcc0cc",
-- surface2 ="#acb0be",
-- teal ="#179299",
-- text ="#4c4f69",
text ="#000000",
--yellow="#df8e1d"
},
},
highlight_overrides = {
latte =function(latte)
return {
LineNr= { bg="#efe1e5" , fg= latte.subtext0},
SignColumn= { bg="#efe1e5"},
Error= { bg= latte.yellow, fg= latte.text },
}
end
},
}
EOF
colorscheme catppuccin-latte
" hi SignColumn guibg=#efe1e5hi MarkologyHLu guifg=Black guibg=Pink
hi MarkologyHLo guifg=Black guibg=Pink
hi MarkologyHLm guifg=Black guibg=Yellow
" hi Error guifg=black guibg=orange gui=none" hi spellBad ctermfg=black ctermbg=gray" hi spellCap ctermfg=black ctermbg=cyan" hi spellRare ctermfg=black ctermbg=cyan" hi spellLocal ctermfg=black ctermbg=yellow" " searches in yellow bg" hi Search guibg=yellow guifg=black ctermfg=black ctermbg=yellow" hi IncSearch guibg=red guifg=black ctermfg=black ctermbg=red" " "" " " which-key" " "lua << EOF
require"which-key".setup{
preset ="helix",
triggers = {
{ "<auto>", mode="nxso" },
{ "`", mode="i" }, --for VimTeX, nowayto put it into tex.lua
},
}
EOF
"" mason"lua << EOF
require("mason").setup()
require("mason-lspconfig").setup()
-- After setting up mason-lspconfig you may setup servers via lspconfig
require("lspconfig").lua_ls.setup {}
require("lspconfig").pyright.setup {}
--...
EOF
"" this is copied from" https://lsp-zero.netlify.app/docs/template/vimscript-config.html"function!LspAttached() abortnnoremap<buffer>K<cmd>lua vim.lsp.buf.hover()<cr>nnoremap<buffer>gd<cmd>lua vim.lsp.buf.definition()<cr>nnoremap<buffer>gD<cmd>lua vim.lsp.buf.declaration()<cr>nnoremap<buffer>gi<cmd>lua vim.lsp.buf.implementation()<cr>nnoremap<buffer>go<cmd>lua vim.lsp.buf.type_definition()<cr>nnoremap<buffer>gr<cmd>lua vim.lsp.buf.references()<cr>nnoremap<buffer>gs<cmd>lua vim.lsp.buf.signature_help()<cr>nnoremap<buffer><C-F2><cmd>lua vim.lsp.buf.rename()<cr>nnoremap<buffer><C-F3><cmd>lua vim.lsp.buf.format({async = true})<cr>xnoremap<buffer><C-F3><cmd>lua vim.lsp.buf.format({async = true})<cr>nnoremap<buffer><C-F4><cmd>lua vim.lsp.buf.code_action()<cr>endfunctionautocmd LspAttach *callLspAttached()
lua <<EOF
local lspconfig_defaults =require('lspconfig').util.default_config
lspconfig_defaults.capabilities =vim.tbl_deep_extend(
'force',
lspconfig_defaults.capabilities,
require('cmp_nvim_lsp').default_capabilities()
)
require('mason').setup({})
require('mason-lspconfig').setup({
ensure_installed = { "lua_ls", "pyright", "ts_ls", "ltex" },
handlers = {
function(server_name)
require('lspconfig')[server_name].setup({})
end,
}
})
require('ltex-client').setup {
opts = {},
}
--complete, cmp
local cmp=require('cmp')
cmp.setup({
sources = {
{name ='nvim_lsp'},
},
snippet = {
expand=function(args)
vim.snippet.expand(args.body)
end,
},
mapping=cmp.mapping.preset.insert({}),
})
EOF
"" vimtex"callvimtex#imaps#add_map({
\ 'lhs' : '<S-CR>',
\ 'rhs' : '
\item ',
\ 'leader' : '',
\ 'wrapper' : 'vimtex#imaps#wrap_environment',
\ 'context' : ["itemize", "enumerate", "description", "compactenum"],
\})
"" Filetype-special inits"" edit xournal files (see https://vi.stackexchange.com/a/10390/854)"augroupgzip_localautocmd!autocmdBufReadPre,FileReadPre*.xojsetlocalbinautocmdBufReadPost,FileReadPost*.xojcallgzip#read("gzip -dn -S .xoj")
autocmdBufWritePost,FileWritePost*.xojcallgzip#write("gzip -S .xoj")
autocmdFileAppendPre*.xojcallgzip#appre("gzip -dn -S .xoj")
autocmdFileAppendPost*.xojcallgzip#write("gzip -S .xoj")
augroupEND" edit xournalpp files (see https://vi.stackexchange.com/a/10390/854)augroupgzip_local2autocmd!autocmdBufReadPre,FileReadPre*.xoppsetlocalbinautocmdBufReadPost,FileReadPost*.xoppcallgzip#read("gzip -dn -S .xopp")
autocmdBufWritePost,FileWritePost*.xoppcallgzip#write("gzip -S .xopp")
autocmdFileAppendPre*.xoppcallgzip#appre("gzip -dn -S .xopp")
autocmdFileAppendPost*.xoppcallgzip#write("gzip -S .xopp")
augroupEND"" filetype settings autocmd"augroupromano_autoautocmd!" LaTeX:"add a % vim: setspelllang=es:tochangelanguageautocmdFileTypetexsetspellwraplinebreakshowbreak=+\ conceallevel=0autocmdFileTypetexsetfdm=marker fmr=%<<<,%>>>
autocmdFileTypetexhighlight link texTitleArg Include" pythonautocmdFileTypepythonsettabstop=4shiftwidth=4expandtabwraplinebreakshowbreak=+\autocmdFileTypepythonletg:better_whitespace_enabled=1autocmdFileTypepythonletg:strip_whitespace_on_save=0" JSautocmdFileTypejavascriptsettabstop=4shiftwidth=4expandtabwraplinebreakshowbreak=+\autocmdFileTypejavascriptletg:better_whitespace_enabled=1autocmdFileTypejavascriptletg:strip_whitespace_on_save=0" textautocmdFiletypetextsetwraplinebreakshowbreak=+\" htmlautocmdFiletypehtmlsetwraplinebreakshowbreak=+\" set current dirautocmdFiletypemarkdownsetspelltabstop=4shiftwidth=4expandtabwraplinebreakshowbreak=+\augroupEND"setcompleteopt=menuone,longest,preview
setcomplete+=ksetcomplete-=i"see https://github.com/lervag/vimtex/issues/1677"" folding"setfoldmethod=marker
""" End filetype settings""" Keyboard settings"" <F> keys --- redefining the ones that normally are left alone" by the plugins. Check them anyway." F2 save and go back where we werennoremap<F2>:update<CR>vnoremap<F2><Esc>:update<CR>inoremap<F2><Esc>:update<CR>" shift-F2 saves without leaving input modeinoremap<S-F2><c-o>:update<CR>" F3 set local buffer nomodifiablennoremap<F3>:setlocal nomodifiable <CR>nnoremap<S-F3>:setlocal modifiable <CR>" leader-c change current directory to the one of the current filenoremap<silent><F4>:noh <CR>" F9 toggles line numberssetnonumbernorelativenumbernoremap<silent><F9>:set number! relativenumber!<cr>" Add an undo point before ctrl-r in input mode" see http://vi.stackexchange.com/questions/4556/undo-in-insert-modeinoremap<C-R><C-G>u<C-R>" Visual movement with the arrows and End-Homennoremap<Down>gjnnoremap<Up>gkvnoremap<Down>gjvnoremap<Up>gkinoremap<expr><Down>pumvisible() ? '<C-N>' : '<C-O>gj'inoremap<expr><Up>pumvisible() ? '<C-P>' : '<C-O>gk'inoremap<Home><C-o>g<Home>inoremap<End><C-o>g<End>"" Settings (in general)"sethistory=50" keep 50 lines of command line historysetruler" show the cursor position all the timesetshowcmd" Show partial commands in the last line of the screensetignorecase" case insensitive search, except when using capitalssetsmartcase" case insensitive patterns, when lowercase is usedsetsmarttab" smart tabulation and backspacesetexpandtab" I really prefer spacessetautoindentsetbreakindentsetshowmode" Show the current modesetshowmatch" show matching bracessethlsearch" highlight searchessetincsearch" find as you typesettitle" show titlesetpastetoggle=<F11>" F11 toggles indenting when pastingsetwildmenu" make command-line completion bash like + menusetwildmode=longest:full
setscrolloff=2" see a couple of lines around top and bottomsetdisplay+=lastline" show partial long linessetlcs=trail:·,tab:»·,eol:⤶" listchars to be used when selecting set listsetvirtualedit=block
setbackupsetbackupdir=~/.config/nvim/backups//,/tmp"" GUI settings"setundolevels=1000" 1000 undossetundoreload=10000setundodir=~/.config/nvim/undodir" persistent unodsetundofile" set guifont=JetBrains\ Mono:h11,Inconsolata:h11ifexists("g:neovide")
"put neovide explicit things hereelse"in neovide the font is set by config.tomlifhostname() =='romano-yoga'setguifont=JetBrains\ Mono\ NL:h11elsesetguifont=JetBrains\ Mono\ NL:h10endifendif"" MACROS here"" macros for general editing:" c: copy all, p: para to line and copy, z: zap all and paste," a: paste at the end, o: open line" f: para-to-line for the current paragraphlet@c='ggVG"+y'let@p= '1G:%! para_to_line.py
ggVG"+y'let@z='ggVGd"+p'let@a='Go�"+p'let@o='0O�j'let@f= 'vip:! para_to_line.py
}'
"" statistics for the current paragraph"let@s= 'vip:!/home/romano/software/scripts/stat_region.py
}'
"" twiddle case from https://vim.fandom.com/wiki/Switching_case_of_characters" visual select and press ~"function!TwiddleCase(str)
ifa:str==# toupper(a:str)
let result =tolower(a:str)
elseifa:str==# tolower(a:str)
let result =substitute(a:str,'\(\<\w\+\>\)', '\u\1', 'g')
elselet result =toupper(a:str)
endifreturn result
endfunctionvnoremap~y:call setreg('', TwiddleCase(@"), getregtype(''))<CR>gv""Pgv
Activity
chrisbra commentedon Jan 7, 2025
I don't see this :/ Can you reproduce just with this single file? Do you have any configuration set?
Line 9, Column 17 ist the
Black, not sure why this would error out here.Rmano commentedon Jan 7, 2025
Uff, yes, I have a bit of (ouch) configuration. I'll see if I can reproduce it with a minimal config.
Thank you for your prompt answer.
Rmano commentedon Jan 8, 2025
I can confirm that I have no error with a minimal configuration, so it must be some clash with some other plugin.
My
init.vimis quite complex, but I can share it if you want to glance at it...Full `init.vim`