Code Monkey home page Code Monkey logo

Comments (9)

 avatar commented on June 19, 2024

I'm such a noob, seems that let g:neotags_highlight default value is not 1 for me. Doc not updated or issue?
But still, the color is pretty hard to see, how can I change the colors?

from neotags.nvim.

c0r73x avatar c0r73x commented on June 19, 2024

Hi

I'm trying to fix it. I've got a problem where some functions dont want to run, and sometimes crash the plugin when you run "nvim [file]" because of that i disabled the highlight feature on load, you have to save the file one time to trigger it.

Yes you can change the colors, this is what i use in my colorscheme.

" neotags {{{2
" 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}}}
" java {{{3
call s:h("JavaClassTag",            { "fg": s:brown })
call s:h("JavaInterfaceTag",        { "fg": s:purple })
call s:h("JavaMethodTag",           { "fg": s:darkred })
" 3}}}
" perl {{{3
call s:h("perlFunctionTag",         { "fg": s:darkred })
" 3}}}
" ruby {{{3
call s:h("rubyModuleNameTag",       { "fg": s:darkgreen })
call s:h("rubyClassNameTag",        { "fg": s:brown })
call s:h("rubyMethodNameTag",       { "fg": s:darkred })
" 3}}}
" shell {{{3
call s:h("shFunctionTag",           { "fg": s:darkred })
" 3}}}
" vim {{{3
call s:h("vimAutoGroupTag",         { "fg": s:purple })
call s:h("vimCommandTag",           { "fg": s:brown })
call s:h("vimFuncNameTag",          { "fg": s:darkred })
call s:h("vimScriptFuncNameTag",    { "fg": s:darkred })
" 3}}}
" python {{{3
call s:h("pythonFunctionTag",       { "fg": s:darkred })
call s:h("pythonMethodTag",         { "fg": s:darkred })
call s:h("pythonClassTag",          { "fg": s:brown })
" 3}}}
" php {{{3
call s:h("phpFunctionsTag",         { "fg": s:darkred })
call s:h("phpClassesTag",           { "fg": s:brown })
" 3}}}
" javascript {{{3
call s:h("javascriptFunctionTag",   { "fg": s:darkred })
call s:h("javascriptClassTag",      { "fg": s:brown })
call s:h("javascriptConstantTag",   { "fg": s:purple })
call s:h("javascriptMethodTag",     { "fg": s:darkred })
call s:h("javascriptObjectTag",     { "fg": s:cyan })
" 3}}}
" 2}}}

from neotags.nvim.

 avatar commented on June 19, 2024

Thanks :) You was working on it, that's why I got a new error message, good to know.
That may sound stupid, but how do you declare s:brown? I didn't find :s

from neotags.nvim.

c0r73x avatar c0r73x commented on June 19, 2024

I define my colors like this

let s:brown      = { "gui": "#ffa000", "cterm": "3" }

then I have a function to set the colors

" 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.gui      : "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.cterm    : "NONE")
    endif
endfunction
" 1}}}

from neotags.nvim.

c0r73x avatar c0r73x commented on June 19, 2024

Now highlighting should work as expected. You might have to run :UpdateRemoteTags to get the new changes.

from neotags.nvim.

 avatar commented on June 19, 2024

Yes I'm able to see highlight right now, but my neovim is so slow.
I think it's because my ctags is huge "googletest was completely parsed because I have #include "gtest.h". Anyway to improve that? Anyway the issue is solved.

EDIT: I think g:neotags_recursive will resolve my lag.

from neotags.nvim.

c0r73x avatar c0r73x commented on June 19, 2024

I noticed that vim gets slow when I add big libs or system includes into the ctags files. Because of that I've added excludes for all libs in my config. That way i only get highlighting for my classes/functions.

Might not be what you want though.

Also switching to something like silver_searcher helps alot when generating the tag files.

from neotags.nvim.

 avatar commented on June 19, 2024

I did that too but with ack directly, that really fast now :) I'm happy, thanks for your plugin.

from neotags.nvim.

c0r73x avatar c0r73x commented on June 19, 2024

Ah nice :)

No problem, I'm glad you like it ;)

from neotags.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.