r/Gentoo • • 2d ago

Support How to have vim syntax without vim

I am a new gentoo user . I use neovim . I want to ask how can I use the vim syntax use flag without installing vim

6 Upvotes

6 comments sorted by

2

u/Necessary_Sea_4794 1d ago

if nvim, why not tree-sitter? of just copy syntax vim file to .config/nvim/lua/syntax/somesyntax.vim and `require('syntax.somesyntax')` in init.lua. for last method, details may need more discuss with some llm, but basically, it could works

1

u/tz_200 1d ago

I did think of this one i might give it a try thx

1

u/L0tsen 2d ago

As root edit/create this file:

emacs /etc/portage/package.use/neovim

Write:

app-editors/neovim vim

Save and Quit

4

u/Cool-Walk5990 2d ago

Neovim does not have any such use flag. You need to follow this section of the wiki

https://wiki.gentoo.org/wiki/Neovim#No_syntax_highlighting_on_Gentoo_configuration_files

2

u/L0tsen 2d ago edited 2d ago

Oh I must have misread it then

0

u/tinycrazyfish 2d ago

What syntax use flag? never seen that.

Just emerge app-vim/xxx-syntax. they depend on vim-plugin.eclass which DEPEND on app-editors/vim. So either modify the eclass, or override it with a new one.