0

I'm trying to find a good configuration for ctags with C#. I know I can use OmniSharp, but I'd like to have tags for other plugins and when OmniSharp is broken.

I started with something based on this old blog post. It didn't include structs.

I also want namespace kind for inclement.

I added almost all kinds and have been using this for a while:

# all C# kinds except:
# e  enumerators (enumeration values) -- just jump to enum instead
# f  fields -- adds 70% more bytes
# l  local variables -- adds 90% more bytes
ctags --c#-kinds=cismpdngtE --fields=+ianmzS --extra=+fq -L $tagfile

(Size values are based on a ~10 MB tag file and I find larger tag files result in slower jumps.)

I'm unsatisfied. Searching github is unhelpful.

For now, I'm trying adding minimal fields info and removing extra info (not entirely sure how extra is used if I don't have vimscript processing it):

ctags --c#-kinds=cismpdngtEf --fields=kst -L $tagfile

Do you have a better ctag solution for C#?

Please no lsp/OmniSharp-based solutions.

  • Which ctags are you using? You may get slightly better results with newer, maintained versions – D. Ben Knoble Jul 31 '18 at 12:03
  • I'm using ctags 5.9 which is the newest exuberant-ctags release I can find. Looks like universal-ctags is no longer considered beta, so I could check that out. However, I still have the problem of how to configure it. (Or are you asserting that it would have better defaults?) – idbrii Jul 31 '18 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.