-
-
Notifications
You must be signed in to change notification settings - Fork 9
Sluggish with big projects #8
Comments
That sounds strange indeed. 8.8kb shouldn't be sluggish, I've tested it on the neovim source code that generates a 3.5mb neotags file, and it works but it's abit sluggish when all the syntax matchers are in. Never tested it on windows though. I will do some testing to see if I can replicate the problem. |
I am sorry I meant to say ~8.8mb. Thanks for the quick reply |
Can you try with the latest commit, I did some tweaks using itertools. |
Now I cannot get it to create the tags file. It creates the file per say but is always of size 0. |
Very strange, I will add some debug functions. I've tried to add thread support but I cant get it to work, it seems that whenever I spawn a thread the neovim api crashes. I will do some more testing during the weekend. |
Sounds awesome. Maybe even oportunity to file for `neovim` bug. I'll try to look for some plugins that uses threads
remotely.
|
I did manage to get some speed improvements. Now it reads the neovim-source tagfile in about 0.20s, i also added a new variable g:neotags_verbose to see what part of the plugin that runs slow. And i updated some of the error handling. I also noticed that on linux if i set shell=False to the Popen (pythons function to open an new process) the ctags file is empty. It might be that we need some special tricks on windows. |
Waoo this almost super awesome:
And that tag file is of size: |
Awesome :D You probably need to add some highlights for the tag syntax. I should probably add this to the documentation :P For example, this is what i use for C/C++. " colors {{{1
let s:bg = { 'gui': '#0c0c0c', 'cterm': 'none' }
let s:fg = { 'gui': '#424242', 'cterm': 'none' }
let s:black = { 'gui': '#212121', 'cterm': '0' }
let s:grey = { 'gui': '#424242', 'cterm': '8' }
let s:darkred = { 'gui': '#d32f2f', 'cterm': '1' }
let s:red = { 'gui': '#f44336', 'cterm': '9' }
let s:darkgreen = { 'gui': '#689f38', 'cterm': '2' }
let s:green = { 'gui': '#8bc34a', 'cterm': '10' }
let s:brown = { 'gui': '#ffa000', 'cterm': '3' }
let s:yellow = { 'gui': '#ffc107', 'cterm': '11' }
let s:darkblue = { 'gui': '#0288d1', 'cterm': '4' }
let s:blue = { 'gui': '#03a9f4', 'cterm': '12' }
let s:purple = { 'gui': '#c2185b', 'cterm': '5' }
let s:pink = { 'gui': '#e91e63', 'cterm': '13' }
let s:darkcyan = { 'gui': '#0097a7', 'cterm': '6' }
let s:cyan = { 'gui': '#00bcd4', 'cterm': '14' }
let s:lightgrey = { 'gui': '#757575', 'cterm': '7' }
let s:white = { 'gui': '#e0e0e0', 'cterm': '15' }
let s:darkergrey = { 'gui': '#121212', 'cterm': '233' }
let s:darkgrey = { 'gui': '#1c1c1c', 'cterm': '234' }
" 1}}}
" util {{{1
function! s:h(group, style)
if(has_key(a:style, 'link'))
exec 'highlight! link ' a:group a:style.link
else
exec 'highlight' a:group
\ 'guifg=' (has_key(a:style, 'fg') ? a:style.fg.gui : 'NONE')
\ 'guibg=' (has_key(a:style, 'bg') ? a:style.bg.gui : 'NONE')
\ 'guisp=' (has_key(a:style, 'sp') ? a:style.sp.gui : 'NONE')
\ 'gui=' (has_key(a:style, 'deco') ? a:style.deco : 'NONE')
\ 'ctermfg=' (has_key(a:style, 'fg') ? a:style.fg.cterm : 'NONE')
\ 'ctermbg=' (has_key(a:style, 'bg') ? a:style.bg.cterm : 'NONE')
\ 'cterm=' (has_key(a:style, 'deco') ? a:style.deco : 'NONE')
endif
endfunction
" 1}}}
" c/cpp {{{3
call s:h('cTypeTag', { 'fg': s:brown })
call s:h('cPreProcTag', { 'fg': s:purple })
call s:h('cFunctionTag', { 'fg': s:darkred })
call s:h('cMemberTag', { 'link': 'cMember' })
call s:h('cEnumTag', { 'link': 'cEnum' })
call s:h('cppTypeTag', { 'fg': s:brown })
call s:h('cppPreProcTag', { 'fg': s:purple })
call s:h('cppFunctionTag', { 'fg': s:darkred })
call s:h('cppMemberTag', { 'link': 'cppMember' })
call s:h('cppEnumTag', { 'link': 'cppEnum' })
" 3}}} |
I will help you with that as soon as I understand what the heck is going on 😄 |
Oh, I just copy/pasted from my syntax file :P But you can just place some highlights in your vimrc, for example highlight cppFunctionTag ctermfg=2 guifg=#00ff00 You can see what highlights that gets created by looking in neovim.vim. Hopefully this helps :) |
OMG man so dumb :( I can't get it to work :( I placed this in my highlight cppEnum ctermfg=2 guifg=#00ff00
highlight cppFunction ctermfg=2 guifg=#00ff00
highlight cppMember ctermfg=2 guifg=#00ff00 and got nothing |
after/syntax/cpp.vim should work but you have to add Tag :) like this. highlight cppEnumTag ctermfg=2 guifg=#00ff00
highlight cppFunctionTag ctermfg=2 guifg=#00ff00
highlight cppMemberTag ctermfg=2 guifg=#00ff00 |
😭 It still doesnt work 😭 I dunno. Maybe its neovim-qt. I should probably try it under unix. I use |
Very strange, I just tested on neovim-qt on linux with the same highlight in after/syntax/cpp.vim and it works. I think I will have to setup a Windows VM to be able to test further :/ As for debugging, you could check |
The |
Ah nice, I will setup a VM this weekend and do some testing :) |
I made some discoveries:
let g:neotags_enabled = 1
let g:neotags_file = g:cache_path . 'ctags/neotags'
let g:neotags_verbose = 1
let g:neotags_run_ctags = 0
Therefore, like I mention before even though the file P.S: Hmm.....it just occurred to me that maybe the new |
I use universal ctags aswell on gentoo. but if i check the --help it says
Also this is the version I'm using.
So that shouldn't be a problem. Yeah if it's running slow with big tag files it's probably highlighting but missing "highlighters". I dont think that it would matter if you add a none existing file to &tags, neovim and neotags should just skip it. Just to test things, if you check with easytags do you get highlighting from the same tag files? This is a very strang issue indeed. |
I got the highlighting!! 💯 😃 |
Ah nice! Humm yeah it looks abit slow but unfortunately that slowness is not because of neotags, it's because of neovims highlight. You might be able to optimize it by disabling some of the highlight rules with |
Got super improvements on speed with these: set regexpengine=1
let g:neotags#cpp#order = 'ced'
let g:neotags#c#order = 'ced' I remembered P.S: I had forgotten about the syntax file. I think its awesome. It should definitely be included in the documentation. |
Hi,
Thanks for awesome plugin. My issue is that neovim in windows because extremely sluggish when neotags is enabled for big projects. On the other side I dont even see any highlight difference. I assume is because is busy
_parseLine()
and not done yet. Theneotags
file that it creates is ~8.8kb. However, if I use the default options:Then
neotags
ctags file is created but always with size 0.This below is my configuration:
Thanks for the support
The text was updated successfully, but these errors were encountered: