On Tue, Feb 22, 2022 at 8:50 AM Andreas Schneider <a...@redhat.com> wrote:
> Hi,
>
> I'm a big fan of neovim (emacs users jump to 'emacs:' ;-). neovim has support
> for the Language Server Protocol and there is a nice plugin called 'null-ls'
> [1] which allows you to hook linters and formatters into neovim.
>
> I've added support for rpmspec in 'null-ls' so you can get feedback directly
> while editing a spec file. See the attached screenshot.
>
> How to configure it:
>
> ```
> local ok, null_ls = pcall(require, 'null-ls')
> if not ok then
>     return
> end
> local sources = {}
>
> if vim.fn.executable('rpmspec') == 1 then
>     table.insert(sources, null_ls.builtins.diagnostics.rpmspec)
> end
>
> null_ls.setup({
>     debug = false,
>     sources = sources,
> })
> ```
>
> What is currently missing in rpmspec is support to parse the input form stdin
> instead of a file [2]. But there is already a PR to support it [3].

`rpmspec -P /dev/stdin` seems to work already now. I use this "trick"
all the time with programs that don't support stdin/stdout natively.
(Sometimes even that doesn't work, e.g. if the program tries to seek
or mmap it, but often it does.)

>
> Best regards
>
>
>         Andreas
>
>
> [1] https://github.com/jose-elias-alvarez/null-ls.nvim/
> [2] https://github.com/rpm-software-management/rpm/issues/1926
> [3] https://github.com/rpm-software-management/rpm/pull/1928
<snip>

-- 
Ondrej Mosnacek
Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to