Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: port or read problem matchers from neovim :compiler #246

Open
1 task done
zspher opened this issue Dec 20, 2023 · 6 comments
Open
1 task done

feature request: port or read problem matchers from neovim :compiler #246

zspher opened this issue Dec 20, 2023 · 6 comments
Labels
enhancement New feature or request P2 Not a priority. PRs welcome

Comments

@zspher
Copy link

zspher commented Dec 20, 2023

Did you check existing requests?

  • I have searched the existing issues

Describe the feature

Reads problem matchers in neovim compilers through any of the ff:

  1. parsing errorformat when :compiler <compiler> is called.
  2. reading the compiler.vim file directly
  3. porting problem matchers into this project

Provide background

I use :compiler and :make. It would be nice port or make use of already installed promblem matchers from neovim compilers.

What is the significance of this feature?

nice to have

Additional details

No response

@zspher zspher added the enhancement New feature or request label Dec 20, 2023
@zspher zspher changed the title feature request: port or read parsers from neovim :compiler feature request: port or read problem matchers from neovim :compiler Dec 21, 2023
@stevearc
Copy link
Owner

We should already pick up the errorformat if you've run the :compiler command, but currently there is no way to specify an errorformat by compiler name. It sounds like a bit of a pain because you'll need to search the runtimepath for the compiler file and parse it to extract the errorformat, but it's doable. I'd happily review a PR for this

@stevearc stevearc added the P2 Not a priority. PRs welcome label Dec 24, 2023
@zspher
Copy link
Author

zspher commented Dec 24, 2023

just checked, it would seem that errorformat from :compiler is not applied in runtime.

image

probably just going to use the :Make overseer recipe with "on_output_quickfix" errorfotmat set to vim.o.efm

@stevearc
Copy link
Owner

Do you have a repro? Because all I'm using to parse the output is

items = vim.fn.getqflist({
lines = lines,
efm = params.errorformat,
}).items

If you're not passing in an explicit errorformat then it should use the default behavior, and from :help getqflist

efm	errorformat to use when parsing "lines". If
        not present, then the 'errorformat' option
	value is used.

so I would expect it to default to using vim.o.errorformat

@zspher

This comment was marked as off-topic.

@zspher
Copy link
Author

zspher commented Dec 24, 2023

it seems that efm is set if using :compiler! dotnet

:comp[iler][!] {name}		Set options to work with compiler {name}.
				Without the "!" options are set for the
				current buffer.  With "!" global options are
				set.

@stevearc
Copy link
Owner

I've moved this to a different issue as a bug report, with higher priority.
I'm keeping this issue open as well because being able to specify a compiler instead of an errorformat in the parameters of on_ouput_quickfix is a cool feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 Not a priority. PRs welcome
Projects
None yet
Development

No branches or pull requests

2 participants