ej-shafran / compile-mode.nvim

A plugin for Neovim inspired by Emacs' Compilation Mode
The Unlicense
50 stars 12 forks source link

Apply changes from nightly #22

Closed ej-shafran closed 1 month ago

ej-shafran commented 1 month ago

This pull request includes the changes which will make up version 4.0.0.

The two main changes in this version are the deprecation of setup() and the change in error-jumping behavior.

setup Deprecation

setup() has been deprecated as the way to configure the plugin - instead, users of the plugin should set the vim.g.compile_mode table to their configuration options, like so:

- require("compile-mode").setup {
+ ---@type CompileModeOpts
+ vim.g.compile_mode = {
     -- options go here
 }

(Depending on your Lua LSP, you may need to add ---@module "compile-mode" for the ---@type CompileModeOpts type annotation to work)

As of 4.0.0, the setup function will continue to work, but it will log a warning.

⛔️ The setup function will be removed entirely in version 5.0.0 ⛔️

Error-jumping Behavior

The splitting behavior for jumping to errors has been changed; the new behavior mimics the way the Emacs mode works - use the current window, unless that window is the compilation buffer, in which case use another existing window or create a split if none exists - but enables the usage of commands like :vertical and other modifiers to determine the manner in which splits occur.