Giter Club home page Giter Club logo

gentoo-syntax's Introduction

gentoo-syntax

A vim plugin that handles Gentoo and portage related syntax highlighting, filetype, and indent settings.

Installing

  • Gentoo users: emerge app-vim/gentoo-syntax
  • Everyone else: make PREFIX=~/.vim/ install

Syntastic

This plugin provides a syntax checker for ebuilds and eclasses. To enable it, you need to install Syntastic and pkgcheck first:

# emerge app-vim/syntastic dev-util/pkgcheck

Then you'll need to configure Syntastic (see :help syntastic-quickstart) and add the following line to your .vimrc file:

let g:syntastic_ebuild_checkers = ['pkgcheck']

To find non-POSIX code in OpenRC services, install dev-util/checkbashisms and enable it for filetype "sh":

let g:syntastic_sh_checkers = ['sh', 'checkbashisms']

Asynchronous Lint Engine

A pkgcheck-based linter for ALE is also installed. It will be enabled automatically if pkgcheck is installed, no manual action is required.

Bugs

Please file issues or submit pull requests on github.

License

You may redistribute this package under the same terms as Vim itself.

gentoo-syntax's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gentoo-syntax's Issues

runscript -> openrc-run

OpenRC has switched to using openrc-run as the program that runs initscripts. plugin/newinitd.vim should thus put openrc-run in the shebang line. ftdetect/gentoo.vim needs to detect both runscript and openrc-run as initscripts.

category/package-version highlighting

In nano I get very nice highlighting corresponding to the Package Manager Specification "CPV" naming scheme:

screenshot from 2017-08-02 03-31-46

In vim (having installed this package) I get the following, considerably lamer, highlighting:

screenshot from 2017-08-02 03-31-55

Is this the intended effect, or have I failed to enable something about this plug-in. If this actually is the intended highlighting, what would be needed to improve it?

eix tells me I have:

[I] app-editors/vim
     Available versions:  8.0.0386 (~)8.0.0386-r1 **9999 {X acl cscope debug gpm lua luajit minimal nls perl python racket ruby selinux tcl vim-pager PYTHON_SINGLE_TARGET="python2_7 python3_4 python3_5 python3_6" PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6"}
     Installed versions:  8.0.0386-r1(09:27:56 06.06.2017)(X acl gpm nls -cscope -debug -lua -luajit -minimal -perl -python -racket -ruby -selinux -tcl -vim-pager PYTHON_SINGLE_TARGET="python3_4 -python2_7 -python3_5 -python3_6" PYTHON_TARGETS="python2_7 python3_4 -python3_5 -python3_6")
     Homepage:            http://www.vim.org/ https://github.com/vim/vim
     Description:         Vim, an improved vi-style text editor

and

[I] app-vim/gentoo-syntax
     Available versions:  20160530 20170225 **99999999 {ignore-glep31}
     Installed versions:  20170225(01:14:34 11.04.2017)(-ignore-glep31)
     Homepage:            https://github.com/gentoo/gentoo-syntax
     Description:         Gentoo and portage related syntax highlighting, filetype, and indent settings

Neovim

This works fine in Vim but not in Neovim
Any tips?

strip-linguas

please add syntax highlighting for strip-linguas in the list of valid inherits

Python detection relies on eselect-python

When eselect-python is not installed (which by now should be norm) creating a python related ebuild results in:

...

PYTHON_COMPAT=( !!! Error: Can't load module pythonexiting )

...

I think it needs to be updated to query PYTHON_TARGETS or PYTHON_SINGLE_TARGET.

Bump to EAPI=7

EAPI 7 is available but gentoo-syntax still puts "EAPI=6".
Please update.

Rename PORT_LOGDIR to PORTAGE_LOGDIR

Hello.

According to /usr/share/doc/portage-2.3.66-r1/NEWS.bz2, PORT_LOGDIR and PORT_LOGDIR_CLEAN have been renamed to PORTAGE_LOGDIR and PORTAGE_LOGDIR_CLEAN.

Please update the syntax highlight file.

Thanks.

New ebuild throws randomly suggested pypi pages as default HOMEPAGE

vim whatever.ebuild
results in

...
HOMEPAGE="
    https://pypi.org/project/root/
"
...

Some packages do have matching pypi packages although my ebuilds have nothing to do with them. This is awkward, and I only imagine it comes from gentoo-syntax?

[binary R ] app-editors/vim-8.2.3950-1::gentoo USE="acl crypt -X -cscope -debug -gpm -lua -minimal -nls -perl -python -racket -ruby (-selinux) -sound -tcl -terminal -vim-pager" LUA_SINGLE_TARGET="lua5-1 -luajit" PYTHON_SINGLE_TARGET="python3_9 -python3_8 -python3_10" 0 KiB
[binary R ] app-vim/gentoo-syntax-20220203-1::gentoo USE="-ignore-glep31" 0 KiB

EDIT: I understand the pypi page could be added when it's detected we're under say dev-python/, but if we're anywhere else in the git-tree it's most likely not going to match pypi.

Issue with gentoo-syntax and vim Gentoo-8.0.0386

Hello,

When app-vim/gentoo-syntax (20170225) is installed, my vim exhibits strange warnings:

$ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 17 2017 05:20:33)
Included patches: 1-386
Modified by Gentoo-8.0.0386
$ vim foobar

(no trouble)

but:

$ touch .vimrc
$ vim foobar

--- Auto-Commands ---
Error detected while processing /usr/share/vim/vimfiles/plugin/newebuild.vim:
line  200:
E10: \ should be followed by /, ? or &
line  201:
E10: \ should be followed by /, ? or &
line  202:
E10: \ should be followed by /, ? or &
--- Auto-Commands ---
Error detected while processing /usr/share/vim/vimfiles/plugin/newinitd.vim:
line   41:
E10: \ should be followed by /, ? or &
--- Auto-Commands ---
Error detected while processing /usr/share/vim/vimfiles/plugin/newmetadata.vim:
line  111:
E10: \ should be followed by /, ? or &
Press ENTER or type command to continue

Any idea ?

License header does not match /usr/portage/header.txt

Hello,

The contents of my /usr/portage/header.txt show:

# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

However, when I create an empty .ebuild the header looks like this:

# Copyright 2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

Wondering if the plugin should match header.txt, or the other way round? :)
I can across this through the wiki on writing Ebuild.
https://wiki.gentoo.org/wiki/Basic_guide_to_write_Gentoo_Ebuilds#Example:_Package_for_a_file_that_echoes_.22hello_world.21.22

Remapping of leader key in bugsummary.vim

There is a mapping in bugsummary.vim (line 155) to bug that should probably be mapped to something else; especially since this is part of a plugin included in vim by default when downloaded from portage, and leader shortcuts are meant to be set for personal use.

Specifically, this affects me because I have a personal mapping to b, and when I use that mapping it pauses in order to determine if I am going to type b or bug.

Thanks for your time and attention, have a nice week.

suggestion about l:email and l:user

in newmetadata.vim

        let l:user = GentooGetUser()
        let l:email = matchstr(l:user, "\\(<\\)\\@<=[^>]\\+\\(>\\)\\@=")
        let l:name = matchstr(l:user, "^[^<]\\+\\( <\\)\\@=")

i recommend use git config --global user.email to get l:email. for l:user, too.
it is a suggestion. thanks!

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.