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

make window/buffer/local scope of make_error_patterns work #5175

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

QiBaobin
Copy link
Contributor

@QiBaobin QiBaobin commented May 14, 2024

make the option useful in other scopes, for example:

hook global BufSetOption filetype=zig %{
    set-option buffer makecmd 'zig'
    set-option buffer make_error_pattern "^(?:\w:)?([^:\n]+):(\d+):(?:(\d+):)? (?:fatal )?error:([^\n]+)?"
    set-option buffer formatcmd 'zig fmt --stdin'
    set-option buffer lintcmd 'zig fmt --check'
}
  evaluate-commands -try-client %opt{toolsclient} %{
      set local makecmd "%val{client_env_SHELL}"
      set local make_error_pattern  %{(?:e: )?(?:file://)?([^\n:]+)(?::(\d+))?(?::(\d+))?}
      make -c "%arg{@}"
      rename-buffer "%arg{@}"
  }

@QiBaobin QiBaobin changed the title support different make_error_patterns for different file types make window/buffer/local scope of make_error_patterns for different work Aug 4, 2024
@QiBaobin QiBaobin changed the title make window/buffer/local scope of make_error_patterns for different work make window/buffer/local scope of make_error_patterns work Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant