nvf/docs/release-notes/rl-0.7.md
2024-10-23 15:32:57 +02:00

11 KiB

Release 0.7

Release notes for release 0.7

Breaking Changes and Migration Guide

vim.configRC removed

In v0.7 we are removing vim.configRC in favor of making vim.luaConfigRC the top-level DAG, and thereby making the entire configuration Lua based. This change introduces a few breaking changes:

  • vim.configRC has been removed, which means that you have to convert all of your custom vimscript-based configuration to Lua. As for how to do that, you will have to consult the Neovim documentation and your search engine.
  • After migrating your Vimscript-based configuration to Lua, you might not be able to use the same entry names in vim.luaConfigRC, because those have also slightly changed. See the new DAG entries in nvf manual for more details.

Why?

Neovim being an aggressive refactor of Vim, is designed to be mainly Lua based; making good use of its extensive Lua API. Additionally, Vimscript is slow and brings unnecessary performance overhead while working with different configuration formats.

vim.maps rewrite

Instead of specifying map modes using submodules (eg.: vim.maps.normal), a new vim.keymaps submodule with support for a mode option has been introduced. It can be either a string, or a list of strings, where a string represents the short-name of the map mode(s), that the mapping should be set for. See :help map-modes for more information.

For example:

vim.maps.normal."<leader>m" = { ... };

has to be replaced by

vim.keymaps = [
  {
    key = "<leader>m";
    mode = "n";
  }
  ...
];

vim.lsp.nvimCodeActionMenu removed in favor of vim.ui.fastaction

The nvim-code-action-menu plugin has been archived and broken for a long time, so it's being replaced with a young, but better alternative called fastaction.nvim. Simply remove everything set under vim.lsp.nvimCodeActionMenu, and set vim.ui.fastaction.enable to true.

Note that we are looking to add more alternatives in the future like dressing.nvim and actions-preview.nvim, in case fastaction doesn't work for everyone.

Changelog

ItsSorae:

  • Add support for typst under vim.languages.typst This will enable the typst-lsp language server, and the typstfmt formatter

frothymarrow:

  • Modified type for from anything to a submodule for better type checking.

  • Fix null vim.lsp.mappings generating an error and not being filtered out.

  • Add basic transparency support for oxocarbon theme by setting the highlight group for Normal, NormalFloat, LineNr, SignColumn and optionally NvimTreeNormal to none.

  • Fix using the wrong type int instead of the expected type string.

horriblename:

  • Fix broken treesitter-context keybinds in visual mode
  • Deprecate use of __empty to define empty tables in Lua. Empty attrset are no longer filtered and thus should be used instead.
  • Add dap-go for better dap configurations
  • Make noice.nvim customizable
  • Standardize border style options and add custom borders
  • Remove vim.disableDefaultRuntimePaths in wrapper options.
    • As nvf uses $NVIM_APP_NAME as of recent changes, we can safely assume any configuration in $XDG_CONFIG_HOME/nvf is intentional.
  • Switch from rust-tools.nvim to the more feature-packed rustaceanvim. This switch entails a whole bunch of new features and options, so you are recommended to go through rustacean.nvim's README to take a closer look at its features and usage

jacekpoz:

diniamo:

  • Move the theme dag entry to before luaScript.

  • Add rustfmt as the default formatter for Rust.

  • Enabled the terminal integration of catppuccin for theming Neovim's built-in terminal (this also affects toggleterm).

  • Migrate bufferline to setupOpts for more customizability

  • Use clangd as the default language server for C languages

  • Expose lib.nvim.types.pluginType, which for example allows the user to create abstractions for adding plugins

  • Migrate indent-blankline to setupOpts for more customizability. While the plugin's options can now be found under indentBlankline.setupOpts, the previous iteration of the module also included out of place/broken options, which have been removed for the time being. These are:

    • listChar - this was already unused
    • fillChar - this had nothing to do with the plugin, please configure it yourself by adding vim.opt.listchars:append({ space = '<char>' }) to your lua configuration
    • eolChar - this also had nothing to do with the plugin, please configure it yourself by adding vim.opt.listchars:append({ eol = '<char>' }) to your lua configuration
  • Replace vim.lsp.nvimCodeActionMenu with vim.ui.fastaction, see the breaking changes section above for more details

  • Add a setupOpts option to nvim-surround, which allows modifying options that aren't defined in nvf. Move the alternate nvim-surround keybinds to use setupOpts.

  • Remove autopairs.type, and rename autopairs.enable to autopairs.nvim-autopairs.enable. The new supports setupOpts format by default.

  • Refactor of nvim-cmp and completion related modules

    • Remove autocomplete.type in favor of per-plugin enable options such as .
    • Deprecate legacy Vimsnip in favor of Luasnip, and integrate friendly-snippets for bundled snippets. can be used to toggle Luasnip.
    • Add sorting function options for completion sources under
  • Make Neovim's configuration file entirely Lua based. This comes with a few breaking changes:

    • vim.configRC has been removed. You will need to migrate your entries to Neovim-compliant Lua code, and add them to vim.luaConfigRC instead. Existing vimscript configurations may be preserved in vim.cmd functions. Please see Neovim documentation on vim.cmd
    • vim.luaScriptRC is now the top-level DAG, and the internal vim.pluginRC has been introduced for setting up internal plugins. See the "DAG entries in nvf" manual page for more information.
  • Rewrite vim.maps, see the breaking changes section above.

NotAShelf:

  • Add deno fmt as the default Markdown formatter. This will be enabled automatically if you have autoformatting enabled, but can be disabled manually if you choose to.

  • Add vim.extraLuaFiles for optionally sourcing additional lua files in your configuration.

  • Refactor programs.languages.elixir to use lspconfig and none-ls for LSP and formatter setups respectively. Diagnostics support is considered, and may be added once the credo linter has been added to nixpkgs. A pull request is currently open.

  • Remove vim-tidal and friends.

  • Clean up Lualine module to reduce theme dependency on Catppuccin, and fixed blending issues in component separators.

  • Add [ts-ereror-translator.nvim] extension of the TS language module, under vim.languages.ts.extensions.ts-error-translator to aid with Typescript development.

  • Add neo-tree.nvim as an alternative file-tree plugin. It will be available under vim.filetree.neo-tree, similar to nvimtree.

  • Add nvf-print-config & nvf-print-config-path helper scripts to Neovim closure. Both of those scripts have been automatically added to your PATH upon using neovimConfig or programs.nvf.enable.

    • nvf-print-config will display your init.lua, in full.
    • nvf-print-config-path will display the path to a clone of your init.lua. This is not the path used by the Neovim wrapper, but an identical clone.
  • Add vim.ui.breadcrumbs.lualine to allow fine-tuning breadcrumbs behaviour on Lualine. Only vim.ui.breadcrumbs.lualine.winbar is supported for the time being.

    • has been added to allow controlling the default behaviour of the nvim-navic component on Lualine, which used to occupy winbar.lualine_c as long as breadcrumbs are enabled.
    • vim.ui.breadcrumbs.alwaysRender has been renamed to to be conform to the new format.
  • Add basedpyright as a Python LSP server and make it default.

  • Add python-lsp-server as an additional Python LSP server.

  • Add to set vim.o values in in your nvf configuration without using additional Lua. See option documentation for more details.

  • Add to allow user configuration for dashboard.nvim

  • Update lualine.nvim input and add missing themes:

    • Adds ayu, gruvbox_dark, iceberg, moonfly, onedark, powerline_dark and solarized_light themes.

ppenguin:

  • Telescope:
    • Fixed project-nvim command and keybinding
    • Added default ikeybind/command for Telescope resume (<leader>fr)

Soliprem:

  • Add LSP and Treesitter support for R under vim.languages.R.
  • Add Otter support under vim.lsp.otter and an assert to prevent conflict with ccc
  • Fixed typo in Otter's setupOpts
  • Add Neorg support under vim.notes.neorg
  • Add LSP, diagnostics, formatter and Treesitter support for Kotlin under vim.languages.kotlin
  • changed default keybinds for leap.nvim to avoid altering expected behavior

Bloxx12

  • Add support for base16 theming under vim.theme
  • Fix internal breakage in elixir-tools setup.

ksonj: