Skip to content

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