Compare commits

..

9 commits

Author SHA1 Message Date
diniamo
b44039031a
Merge branch 'v0.7' into lib/simpler-binds 2024-12-02 18:31:46 +01:00
c87d2520c2
flake: bump inputs 2024-12-01 20:46:30 +03:00
raf
d17c010bf9
Merge pull request #455 from NotAShelf/migrate-opts
neovim/init: set basic options via `vim.options`
2024-12-01 18:45:55 +03:00
98691619ef
docs: update changelogs 2024-12-01 18:38:16 +03:00
a6a06f4e72
modules/{neovim,wrapper}: move Vim options to vim.options defaults 2024-12-01 10:09:13 +03:00
864ee05f57
wrapper/rc: set vim.options and vim.globals to freeform submodules 2024-12-01 09:39:52 +03:00
0e45c70fb9
neovim/init: set basic options via vim.options
Less DAGs, more customizability.
2024-12-01 09:37:05 +03:00
Ching Pei Yang
3b6b6e7322
docs: rename vim.leaderKey to vim.globals.mapleader 2024-11-30 23:37:16 +01:00
Ching Pei Yang
ba14b3538e
wrapper: use freeform types for vim.globals 2024-11-30 23:36:51 +01:00
6 changed files with 361 additions and 317 deletions

View file

@ -49,7 +49,7 @@ absence.
- Made Copilot's Node package configurable. It is recommended to keep as
default, but providing a different NodeJS version is now possible.
- Added [](#opt-vim.cursorlineOpt) for configuring Neovim's cursorlineOpt.
- Added `vim.cursorlineOpt` for configuring Neovim's `vim.o.cursorlineopt`.
- Added `filetree.nvimTreeLua.view.cursorline`, default false, to enable
cursorline in nvimtre.

View file

@ -91,6 +91,30 @@ default. This is to avoid conflicts with other modules. You can change
`maplocalleader` with `vim.globals.maplocalleader`, but it's recommended to set
it to something other than `mapleader` to avoid conflicts.
### `vim.*` changes {#sec-vim-opt-changes}
Inline with the [leader changes](#sec-leader-changes), we have removed some
options that were under `vim` as convenient shorthands for `vim.o.*` options.
::: {.warning}
As v0.7 features the addition of [](#opt-vim.options), those options are now
considered as deprecated. You should migrate to the appropriate options in the
`vim.options` submodule.
:::
The changes are, in no particular order:
- `colourTerm`, `mouseSupport`, `cmdHeight`, `updateTime`, `mapTime`,
`cursorlineOpt`, `splitBelow`, `splitRight`, `autoIndent` and `wordWrap` have
been mapped to their [](#opt-vim.options) equivalents. Please see the module
definition for the updated options.
- `tabWidth` has been **removed** as it lead to confusing behaviour. You can
replicate the same functionality by setting `shiftwidth`, `tabstop` and
`softtabstop` under `vim.options` as you see fit.
## Changelog {#sec-release-0.7-changelog}
[ItsSorae](https://github.com/ItsSorae):
@ -133,10 +157,9 @@ it to something other than `mapleader` to avoid conflicts.
recommended to go through rustacean.nvim's README to take a closer look at its
features and usage
- Add [lz.n] support and lazy-load some builtin plugins.
[lz.n]: https://github.com/mrcjkb/lz.n
- Add [lz.n] support and lazy-load some builtin plugins.
- Add simpler helper functions for making keymaps
[jacekpoz](https://jacekpoz.pl):
@ -302,17 +325,22 @@ it to something other than `mapleader` to avoid conflicts.
spellfiles to Neovim's runtime with ease.
- Add combined nvf configuration (`config.vim`) into the final package's
passthru as `passthru.neovimConfiguration` for easier debugging.
`passthru` as `passthru.neovimConfiguration` for easier debugging.
- Add support for [tiny-devicons-auto-colors] under
`vim.visuals.tiny-devicons-auto-colors`
- Move options that used to set `vim.o` values (e.g. `vim.wordWrap`) into
`vim.options` as default values. Some are left as they don't have a direct
equivalent, but expect a switch eventually.
[ppenguin](https://github.com/ppenguin):
- Telescope:
- Fixed `project-nvim` command and keybinding
- Added default ikeybind/command for `Telescope resume` (`<leader>fr`)
- Add `hcl` lsp/formatter (not the same as `terraform`, which is not useful for e.g. `nomad` config files).
- Add `hcl` lsp/formatter (not the same as `terraform`, which is not useful for
e.g. `nomad` config files).
[Soliprem](https://github.com/Soliprem):

View file

@ -23,11 +23,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -38,11 +38,11 @@
},
"mnw": {
"locked": {
"lastModified": 1731821965,
"narHash": "sha256-QiGi/HBQRnIRGY4gQPuH7T3hr7NznOpEO7qNpF5ldmE=",
"lastModified": 1733021555,
"narHash": "sha256-bc+reHXXfdn94MnDsqBrNm2ojOnJfbd64e00nzsP0EI=",
"owner": "Gerg-L",
"repo": "mnw",
"rev": "5fe5c41975ed0af55f55dc37cd28ba906a5d015e",
"rev": "6841d93fe50eb335da45e11d4dabaa1844f3f79a",
"type": "github"
},
"original": {
@ -83,11 +83,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1726716330,
"narHash": "sha256-mIuOP4I51eFLquRaxMKx67pHmhatZrcVPjfHL98v/M8=",
"lastModified": 1732053863,
"narHash": "sha256-DCIVdlb81Fct2uwzbtnawLBC/U03U2hqx8trqTJB7WA=",
"owner": "oxalica",
"repo": "nil",
"rev": "c8e8ce72442a164d89d3fdeaae0bcc405f8c015a",
"rev": "2e24c9834e3bb5aa2a3701d3713b43a6fb106362",
"type": "github"
},
"original": {
@ -98,11 +98,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1732617236,
"narHash": "sha256-PYkz6U0bSEaEB1al7O1XsqVNeSNS+s3NVclJw7YC43w=",
"lastModified": 1733024928,
"narHash": "sha256-n/DOfpKH1vkukuBnach91QBQId2dr5tkE7/7UrkV2zw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "af51545ec9a44eadf3fe3547610a5cdd882bc34e",
"rev": "2c27ab2e60502d1ebb7cf38909de38663f762a79",
"type": "github"
},
"original": {
@ -159,11 +159,11 @@
"plugin-alpha-nvim": {
"flake": false,
"locked": {
"lastModified": 1727720738,
"narHash": "sha256-33lhPP1C4TGo0UQJ61bwRHaiOMAB7XNehcZGaFXOPjQ=",
"lastModified": 1731604504,
"narHash": "sha256-sNi5qarejYqM4/J7lBZI3gjVLxer5FBPq8K6qjqcMjA=",
"owner": "goolord",
"repo": "alpha-nvim",
"rev": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7",
"rev": "de72250e054e5e691b9736ee30db72c65d560771",
"type": "github"
},
"original": {
@ -207,11 +207,11 @@
"plugin-catppuccin": {
"flake": false,
"locked": {
"lastModified": 1731169755,
"narHash": "sha256-lsnePejThsEygTCKV/rfJJ/h+RSrro91am841iznJe4=",
"lastModified": 1732428187,
"narHash": "sha256-Oogw5wmYkx/zsMlPE/r6Kt3cy5sC92rwVzf0P9rzqyw=",
"owner": "catppuccin",
"repo": "nvim",
"rev": "637d99e638bc6f1efedac582f6ccab08badac0c6",
"rev": "faf15ab0201b564b6368ffa47b56feefc92ce3f4",
"type": "github"
},
"original": {
@ -463,11 +463,11 @@
"plugin-csharpls-extended": {
"flake": false,
"locked": {
"lastModified": 1730857197,
"narHash": "sha256-eKkFpEB7ZXNttXz62y3GaKptt4n0xRY+iuTI8RU5z0Q=",
"lastModified": 1732674428,
"narHash": "sha256-d7ll3OlOLx/7E+6+uga26L/FAqd8pZ4XquMakxMsFwU=",
"owner": "Decodetalkers",
"repo": "csharpls-extended-lsp.nvim",
"rev": "ef02017d80b1cd914d61285b1fb063cb7fe0aa8f",
"rev": "c788fed627827238de348195c3f318cd090e8e77",
"type": "github"
},
"original": {
@ -511,11 +511,11 @@
"plugin-dracula": {
"flake": false,
"locked": {
"lastModified": 1729038981,
"narHash": "sha256-3jFOaFtH+EIx4mUKV0U/cFkUo8By0JgorTYgFUKEs/s=",
"lastModified": 1731308832,
"narHash": "sha256-3Tlk+utoF4QUjTIPszbyMDh5vUyNiBmq4bRW/leMjaU=",
"owner": "Mofiqul",
"repo": "dracula.nvim",
"rev": "94fa7885a06a67f0a8bfa03e064619d05d1ba496",
"rev": "e6128ec3923b92bb2b16e81b4a0f04ed0308038e",
"type": "github"
},
"original": {
@ -527,11 +527,11 @@
"plugin-dressing-nvim": {
"flake": false,
"locked": {
"lastModified": 1730759661,
"narHash": "sha256-F9mdyANs9QTzlB/VAXt+9GXJUiA5th7Fj79WArdUmRE=",
"lastModified": 1731521499,
"narHash": "sha256-O0sdxU+ZQnclnnC5IfBpgqlMxjsJKlmPYQYPP+S3cn8=",
"owner": "stevearc",
"repo": "dressing.nvim",
"rev": "6ef1ca479d37d4ff66f13eed44d08912caff483a",
"rev": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b",
"type": "github"
},
"original": {
@ -559,11 +559,11 @@
"plugin-fastaction-nvim": {
"flake": false,
"locked": {
"lastModified": 1731000037,
"narHash": "sha256-oNLKwWj2lze/ZCcwT98ucw6oT4765EiW1CB0BAjox8A=",
"lastModified": 1732135971,
"narHash": "sha256-Q+FX7XiX8LyTC4OZ43Q2pXIdSViDn65P9pkDp8jvbnA=",
"owner": "Chaitanyabsprip",
"repo": "fastaction.nvim",
"rev": "a55feac91f39b83aa21b9ef3df1e465d9122753c",
"rev": "24255a74e0d35f1e1807aa78997f5c31ae419dbc",
"type": "github"
},
"original": {
@ -591,11 +591,11 @@
"plugin-flutter-tools": {
"flake": false,
"locked": {
"lastModified": 1730275333,
"narHash": "sha256-fKsC+ouSfW07dLipXP+RPMzQfCQ70oGknSdVo7dMAxw=",
"lastModified": 1732910301,
"narHash": "sha256-iU0aTq3F5U2z8iKdUMxkvQ8ZopmWIGdx1I8ir0q7n0U=",
"owner": "akinsho",
"repo": "flutter-tools.nvim",
"rev": "7e6d8611d8606efca64cb8cf1ca07550b7087d1c",
"rev": "40f974b15f82f9af498adda8d93aabd637f3ab58",
"type": "github"
},
"original": {
@ -623,11 +623,11 @@
"plugin-gesture-nvim": {
"flake": false,
"locked": {
"lastModified": 1726696689,
"narHash": "sha256-d1+czQXyJUyNlMhPjRzb6cEiCJVTFrkYnv7XXh2BLNs=",
"lastModified": 1731669851,
"narHash": "sha256-LTkttlDmKO9ngzrJrMWeeG9R0Bz/PoroCAF2URhUEbM=",
"owner": "notomo",
"repo": "gesture.nvim",
"rev": "a63d81325a1f84ad87a7d9e1a36e4eeb4e786fc1",
"rev": "dbd839bda337cb73911aeef06897eb29cb99f76f",
"type": "github"
},
"original": {
@ -639,11 +639,11 @@
"plugin-gitsigns-nvim": {
"flake": false,
"locked": {
"lastModified": 1730713501,
"narHash": "sha256-FHzufzeVrPnbU5j3UabVTCYXP+QNcb7gMgef0BmuclA=",
"lastModified": 1732361574,
"narHash": "sha256-H7A+AxioiedSuC+jqRwP4c7DjZR/0j4o/fTUasT2urc=",
"owner": "lewis6991",
"repo": "gitsigns.nvim",
"rev": "4daf7022f1481edf1e8fb9947df13bb07c18e89a",
"rev": "5f808b5e4fef30bd8aca1b803b4e555da07fc412",
"type": "github"
},
"original": {
@ -671,11 +671,11 @@
"plugin-gruvbox": {
"flake": false,
"locked": {
"lastModified": 1727809136,
"narHash": "sha256-/kgZuNJ1vHyOpvFHiJKCb1HzjSPgqis9Ng4aT7jHXG4=",
"lastModified": 1732485864,
"narHash": "sha256-qasIg1nvAlUWUUzSZLF36jnoNm8PmQa3owgh0tKGgHk=",
"owner": "ellisonleao",
"repo": "gruvbox.nvim",
"rev": "49d9c0b150ba70efcd831ec7b3cb8ee740067045",
"rev": "68c3460a5d1d1a362318960035c9f3466d5011f5",
"type": "github"
},
"original": {
@ -687,11 +687,11 @@
"plugin-highlight-undo": {
"flake": false,
"locked": {
"lastModified": 1729426343,
"narHash": "sha256-zNzVmt4WJcspuloePhc6HbDvNA7B92NscE+fEYvCumc=",
"lastModified": 1732378966,
"narHash": "sha256-b0JrMu3vbbYgyHPs9hyayMzUypFwugEAxvZOcuRMc/o=",
"owner": "tzachar",
"repo": "highlight-undo.nvim",
"rev": "c87a6ec1ded241ef223269077cbd5f97a6f0d5bf",
"rev": "5f588b420179a31d7073854bfd07ed9d5f364645",
"type": "github"
},
"original": {
@ -735,11 +735,11 @@
"plugin-image-nvim": {
"flake": false,
"locked": {
"lastModified": 1730854538,
"narHash": "sha256-G7Nqs8BqLCR46vw6VVazvdGOpan6Wkkv/PfJB+nBbGE=",
"lastModified": 1732136347,
"narHash": "sha256-Az/jiHW/DtvHNlV+Wzw6U+p8b2Ic9pNJRQ6YGerL81c=",
"owner": "3rd",
"repo": "image.nvim",
"rev": "9c9dbed0cdb4dbd199ebfc678a881f5745a36f50",
"rev": "5f8fceca2d1be96a45b81de21c2f98bf6084fb34",
"type": "github"
},
"original": {
@ -751,11 +751,11 @@
"plugin-indent-blankline": {
"flake": false,
"locked": {
"lastModified": 1730170343,
"narHash": "sha256-odv43EyZ3gMg410eBFAkye/SdAj+LcVVZPaZm8w0biM=",
"lastModified": 1731320409,
"narHash": "sha256-WVDNi/woG0ohPEYzM83mmXDCRNYnQbqooSDVUtBsJbY=",
"owner": "lukas-reineke",
"repo": "indent-blankline.nvim",
"rev": "04e44b09ee3ff189c69ab082edac1ef7ae2e256c",
"rev": "7871a88056f7144defca9c931e311a3134c5d509",
"type": "github"
},
"original": {
@ -879,11 +879,11 @@
"plugin-luasnip": {
"flake": false,
"locked": {
"lastModified": 1730895001,
"narHash": "sha256-Vb4unHnhppcM1HZtd8oohJHPlkUHORoYUjKUWyhRM6g=",
"lastModified": 1732967555,
"narHash": "sha256-iWivJ6dIOEqT3uLQA5KzvCHkDcjC62OlNWagEW680qc=",
"owner": "L3MON4D3",
"repo": "LuaSnip",
"rev": "2737edc9e674e537dc0a97e3405658d57d2d31ed",
"rev": "2592b91577136dbb355a4708be1e60619456b7f6",
"type": "github"
},
"original": {
@ -895,11 +895,11 @@
"plugin-lz-n": {
"flake": false,
"locked": {
"lastModified": 1730598851,
"narHash": "sha256-L7og7ZTo5Soyn6pvBHkJcgGuON96eV0V5QC3J1uz/ko=",
"lastModified": 1733019070,
"narHash": "sha256-Go9FBjF3EBFy+/53lpC5AdKYpJBK+uFzInTk6lODxdQ=",
"owner": "nvim-neorocks",
"repo": "lz.n",
"rev": "c8675c983e0682c49a13f17fc7ff9353bcb32120",
"rev": "f308fa4dd81355fb5fddf3ca209847d679af6917",
"type": "github"
},
"original": {
@ -976,11 +976,11 @@
"plugin-neo-tree-nvim": {
"flake": false,
"locked": {
"lastModified": 1726542367,
"narHash": "sha256-Lqt0KJNT9HmpJwZoWChYeVBrDWhscRe8COqVCwgcTwk=",
"lastModified": 1732465535,
"narHash": "sha256-3wRojpFbdjcRQPv62/mHqQgyfytTqaBcsX1X0zCNgC8=",
"owner": "nvim-neo-tree",
"repo": "neo-tree.nvim",
"rev": "a77af2e764c5ed4038d27d1c463fa49cd4794e07",
"rev": "42caaf5c3b7ca346ab278201151bb878006a6031",
"type": "github"
},
"original": {
@ -1024,11 +1024,11 @@
"plugin-neorg": {
"flake": false,
"locked": {
"lastModified": 1730333767,
"narHash": "sha256-qTo8rxwvANrgP8UccFhzsNsH+Jbmqv2iOlw0ccLNYm4=",
"lastModified": 1732289702,
"narHash": "sha256-8RQ+PFnIcjPoNJQB/qz+zv1fjVjFEwPhuAh+JL7GPL4=",
"owner": "nvim-neorg",
"repo": "neorg",
"rev": "488507bb996f75ee29073f50dec32fa220867ca5",
"rev": "7a893a176a7d9c074a5371865b53c6aa4e223991",
"type": "github"
},
"original": {
@ -1072,11 +1072,11 @@
"plugin-noice-nvim": {
"flake": false,
"locked": {
"lastModified": 1731163840,
"narHash": "sha256-zT+fJ88V/LfmibXs4QpIyxCu1HHSjbqsrcQK/vadeRA=",
"lastModified": 1732649160,
"narHash": "sha256-0RLMkThaE6AxYvUKx056Ac63Oc2NTJxvgyRnZJ5/D2g=",
"owner": "folke",
"repo": "noice.nvim",
"rev": "2087bbf8cd64482b47fb5f33b5e0eabf329ab14b",
"rev": "c6f6fb178ebe9b4fd90383de743c3399f8c3a37c",
"type": "github"
},
"original": {
@ -1121,11 +1121,11 @@
"plugin-nvim-autopairs": {
"flake": false,
"locked": {
"lastModified": 1727742362,
"narHash": "sha256-pqYOaEjKUd5YLVWX0Bf/kYT+sBlN1D24rOBuIz2BIqk=",
"lastModified": 1731803843,
"narHash": "sha256-LbaxiU3ienVBcMKrug3Coppc4R+MD2rjREw7rHQim1w=",
"owner": "windwp",
"repo": "nvim-autopairs",
"rev": "ee297f215e95a60b01fde33275cc3c820eddeebe",
"rev": "b464658e9b880f463b9f7e6ccddd93fb0013f559",
"type": "github"
},
"original": {
@ -1137,11 +1137,11 @@
"plugin-nvim-bufferline-lua": {
"flake": false,
"locked": {
"lastModified": 1729768480,
"narHash": "sha256-MpSX8a51Avc9O1XxfWIDOVLiqD7omwAFIwSa02oXNs0=",
"lastModified": 1732824069,
"narHash": "sha256-zqz2GMius0gLxtgxt12RmLUVQFVaWe+MQaGCfUGr6bI=",
"owner": "akinsho",
"repo": "nvim-bufferline.lua",
"rev": "5cc447cb2b463cb499c82eaeabbed4f5fa6a0a44",
"rev": "261a72b90d6db4ed8014f7bda976bcdc9dd7ce76",
"type": "github"
},
"original": {
@ -1153,11 +1153,11 @@
"plugin-nvim-cmp": {
"flake": false,
"locked": {
"lastModified": 1730523275,
"narHash": "sha256-iNEoMl/X0nh2sAio1h+dkuobeOXRBXKFJCcElUyyW54=",
"lastModified": 1732948484,
"narHash": "sha256-+0nflL0WCaxPuJgUviELhbXASNYYl/SKZ+nz70sEAXU=",
"owner": "hrsh7th",
"repo": "nvim-cmp",
"rev": "f17d9b4394027ff4442b298398dfcaab97e40c4f",
"rev": "ca4d3330d386e76967e53b85953c170658255ecb",
"type": "github"
},
"original": {
@ -1169,11 +1169,11 @@
"plugin-nvim-colorizer-lua": {
"flake": false,
"locked": {
"lastModified": 1730855006,
"narHash": "sha256-jDnTDUzslVa+4S2vAwqUZeJN+9Fxf5Naunf6uG54HLI=",
"lastModified": 1732386340,
"narHash": "sha256-lAWeljYC17bmEs1Ss80o6eJYrJ9fsFlKvyJWu9e44XU=",
"owner": "NvChad",
"repo": "nvim-colorizer.lua",
"rev": "f134063618a65cad4d7415fddbd96ff7e0c5b4ae",
"rev": "4acf88d31b3a7a1a7f31e9c30bf2b23c6313abdb",
"type": "github"
},
"original": {
@ -1201,11 +1201,11 @@
"plugin-nvim-dap": {
"flake": false,
"locked": {
"lastModified": 1730842757,
"narHash": "sha256-WiypPzEQnModkzgI7ikq2C9OKc/DBeGLZ8ZaKmzHt2c=",
"lastModified": 1732901614,
"narHash": "sha256-atsgMdPyAAbh4dIxZOAE3hHLLb/664112lHdXHcXtZQ=",
"owner": "mfussenegger",
"repo": "nvim-dap",
"rev": "8517126e9323e346f6a99b3b594c5a940b914dcd",
"rev": "0a0daa796a5919a51e5e5019ffa91219c94c4fef",
"type": "github"
},
"original": {
@ -1281,11 +1281,11 @@
"plugin-nvim-lspconfig": {
"flake": false,
"locked": {
"lastModified": 1730978746,
"narHash": "sha256-N1vqosgHHVUWoszhdGImH//mb7hiSWWsG1Pq9WNnQxk=",
"lastModified": 1733062298,
"narHash": "sha256-tLZYWbKSQxiRU1tQqRXAUSTfCS7a1tHNSIMbt0aOamU=",
"owner": "neovim",
"repo": "nvim-lspconfig",
"rev": "d01864641c6e43c681c3e9f6cf4745c75fdd9dcc",
"rev": "90c1c6cc822b1836209514c096069b9bbeab63d9",
"type": "github"
},
"original": {
@ -1425,11 +1425,11 @@
"plugin-nvim-surround": {
"flake": false,
"locked": {
"lastModified": 1730136751,
"narHash": "sha256-XVwvoM3Id9lCi9EgK/Y944UuCXj9niTnZ5I5+d1yVqQ=",
"lastModified": 1732818349,
"narHash": "sha256-sC+V86FEDfIapY4Qy0Ch2dTUpqe+C/xEUR/iSIEY6LA=",
"owner": "kylechui",
"repo": "nvim-surround",
"rev": "dca2e998ff26681ee422b92c6ed39b3d2908d8a9",
"rev": "9f0cb495f25bff32c936062d85046fbda0c43517",
"type": "github"
},
"original": {
@ -1441,11 +1441,11 @@
"plugin-nvim-tree-lua": {
"flake": false,
"locked": {
"lastModified": 1731123986,
"narHash": "sha256-zt04Q3Mr1k9x6X6l3F9iy3C1edQYha4pQhDsOX5atPM=",
"lastModified": 1732428058,
"narHash": "sha256-HHgC7aH2m3gv2FtOK1jhjBgJOGWrdc+FQOEpMiEWe74=",
"owner": "nvim-tree",
"repo": "nvim-tree.lua",
"rev": "c7639482a1598f4756798df1b2d72f79fe5bb34f",
"rev": "ca7c4c33cac2ad66ec69d45e465379716ef0cc97",
"type": "github"
},
"original": {
@ -1457,11 +1457,11 @@
"plugin-nvim-treesitter-context": {
"flake": false,
"locked": {
"lastModified": 1731163983,
"narHash": "sha256-oRmhwRIynCNmgKpTtwUIliYf0Qo+zP3ymEWYs+vzx8A=",
"lastModified": 1733041360,
"narHash": "sha256-wcz3F0vDrgMXJjB0Zz7naoVQ8YvHdd55gG4NHqQMYQY=",
"owner": "nvim-treesitter",
"repo": "nvim-treesitter-context",
"rev": "158377d700596367a91ea41818f76abdbf75a232",
"rev": "920999bf53daa63ddf12efdeb5137a7cea1cc201",
"type": "github"
},
"original": {
@ -1473,11 +1473,11 @@
"plugin-nvim-ts-autotag": {
"flake": false,
"locked": {
"lastModified": 1724798540,
"narHash": "sha256-QEzUKvT+ChYSa9F4zg3Lw+7Sj0JzJem9nh2mWmS8Y+I=",
"lastModified": 1732998473,
"narHash": "sha256-HtF0arW9cuE4yQN+1ccRaonqiH6fcoTpyuSecLPKtKc=",
"owner": "windwp",
"repo": "nvim-ts-autotag",
"rev": "e239a560f338be31337e7abc3ee42515daf23f5e",
"rev": "f2d24aca1bcbbd2c0306fd93d52e3697027b77ff",
"type": "github"
},
"original": {
@ -1489,11 +1489,11 @@
"plugin-nvim-web-devicons": {
"flake": false,
"locked": {
"lastModified": 1728608318,
"narHash": "sha256-SUWEOp+QcfHjYaqqr4Zwvh0x91IAJXvrdMkQtuWMlGc=",
"lastModified": 1732925137,
"narHash": "sha256-Sh+r54pTI60j5tOmSyEkTVS6MzMIt52nqjNdtMp8kpI=",
"owner": "nvim-tree",
"repo": "nvim-web-devicons",
"rev": "19d257cf889f79f4022163c3fbb5e08639077bd8",
"rev": "203da76ecfbb4b192cf830665b03eb651b635c94",
"type": "github"
},
"original": {
@ -1521,11 +1521,11 @@
"plugin-omnisharp-extended": {
"flake": false,
"locked": {
"lastModified": 1719701797,
"narHash": "sha256-P1ZCaW8w+e3H3oBhbEjDc7vuR+XuxJmb/7IbPL3KWi4=",
"lastModified": 1732802864,
"narHash": "sha256-lA22ncMWHz2oVcZMPQGpLL3UjjXOXGxhtXR1LX5cX3A=",
"owner": "Hoffs",
"repo": "omnisharp-extended-lsp.nvim",
"rev": "aad7bf06b4ca0de816b919d475a75b30f5f62b61",
"rev": "4916fa12e5b28d21a1f031f0bdd10aa15a75d85d",
"type": "github"
},
"original": {
@ -1553,11 +1553,11 @@
"plugin-orgmode-nvim": {
"flake": false,
"locked": {
"lastModified": 1730794385,
"narHash": "sha256-Rt/qhulJjNolQLz9OdP25U2+3KButPHgHc886yFpLpE=",
"lastModified": 1731656059,
"narHash": "sha256-uKJuJsxQhdh3NxZx1Uu72poQVFN7KEyyMFEHPUr7UgQ=",
"owner": "nvim-orgmode",
"repo": "orgmode",
"rev": "fafb8f14d85a68d8f0fca812444cc0fd594f0168",
"rev": "1d8c9b9417f8c8e9fb146d4f54fb1e90a4f7e534",
"type": "github"
},
"original": {
@ -1633,11 +1633,11 @@
"plugin-precognition-nvim": {
"flake": false,
"locked": {
"lastModified": 1730325090,
"narHash": "sha256-onY1Aa+dwLR1wRua52hpSXj6zZOZXjkUlDjDa0xEEcE=",
"lastModified": 1732647805,
"narHash": "sha256-m3dKoKxCd/QODM+EL89c3RVOoZnuA4nrBG0KhPZ/o9Y=",
"owner": "tris203",
"repo": "precognition.nvim",
"rev": "0189e8d6f96275a079b2805d68d49414871885cd",
"rev": "531971e6d883e99b1572bf47294e22988d8fbec0",
"type": "github"
},
"original": {
@ -1729,11 +1729,11 @@
"plugin-rustaceanvim": {
"flake": false,
"locked": {
"lastModified": 1732565373,
"narHash": "sha256-WRaNW0trZYEUKd05Uc+5nP+G81HI14d6lM7/WWz61E0=",
"lastModified": 1732919014,
"narHash": "sha256-7UZ54b3IPS1cPyu+JCM/dHhJLHuqa16suaC2XlSw5Og=",
"owner": "mrcjkb",
"repo": "rustaceanvim",
"rev": "fee0aa094b0c9f93fffe5a385b3d5d2386c2b072",
"rev": "4ac7a3c6cca9e393229651cc90733afbdc7c6395",
"type": "github"
},
"original": {
@ -1761,11 +1761,11 @@
"plugin-sqls-nvim": {
"flake": false,
"locked": {
"lastModified": 1684697500,
"narHash": "sha256-jKFut6NZAf/eIeIkY7/2EsjsIhvZQKCKAJzeQ6XSr0s=",
"lastModified": 1733003065,
"narHash": "sha256-VKN4ggWogAr+hwr/gtIDgY5j3afL9R7dZ2oJ4+qpEtE=",
"owner": "nanotee",
"repo": "sqls.nvim",
"rev": "4b1274b5b44c48ce784aac23747192f5d9d26207",
"rev": "8d7b6010d276fdda494ede23df511eba120886b9",
"type": "github"
},
"original": {
@ -1793,11 +1793,11 @@
"plugin-telescope": {
"flake": false,
"locked": {
"lastModified": 1730164948,
"narHash": "sha256-Qa/f+0asQvA8mhIUajC4BGZCI92OqA6ySVoQSC3ZY3s=",
"lastModified": 1732884846,
"narHash": "sha256-npb61MZYAotz71Co5G1dUeIqWt7GVeqZNz0A2Yz2dy4=",
"owner": "nvim-telescope",
"repo": "telescope.nvim",
"rev": "85922dde3767e01d42a08e750a773effbffaea3e",
"rev": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc",
"type": "github"
},
"original": {
@ -1857,11 +1857,11 @@
"plugin-tokyonight": {
"flake": false,
"locked": {
"lastModified": 1730826006,
"narHash": "sha256-BkSkC9UKcDExpIx91air280soPa8QIa3eK/e/E5QYLc=",
"lastModified": 1732026921,
"narHash": "sha256-vKXlFHzga9DihzDn+v+j3pMNDfvhYHcCT8GpPs0Uxgg=",
"owner": "folke",
"repo": "tokyonight.nvim",
"rev": "ce91ba480070c95f40753e4663e32b4632ac6db3",
"rev": "c2725eb6d086c8c9624456d734bd365194660017",
"type": "github"
},
"original": {
@ -1873,11 +1873,11 @@
"plugin-trouble": {
"flake": false,
"locked": {
"lastModified": 1730928038,
"narHash": "sha256-zUh0o+piRVDMSXLjBj+IygZj3VX7i5nXsaNn2pPu1fg=",
"lastModified": 1732701472,
"narHash": "sha256-JhnERZfma2JHFEn/DElVmrSU5KxM2asx3SJ+86lCfoo=",
"owner": "folke",
"repo": "trouble.nvim",
"rev": "3dc00c0447c016cd43e03054c3d49436a1f2076d",
"rev": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6",
"type": "github"
},
"original": {
@ -1889,11 +1889,11 @@
"plugin-ts-error-translator": {
"flake": false,
"locked": {
"lastModified": 1727112009,
"narHash": "sha256-8eUDQJYfhEsqv9G1QU96k5tTIcVa8oR8/SAoFN1XZ5I=",
"lastModified": 1731721659,
"narHash": "sha256-fi68jJVNTL2WlTehcl5Q8tijAeu2usjIsWXjcuixkCM=",
"owner": "dmmulroy",
"repo": "ts-error-translator.nvim",
"rev": "3bd23c4cfe4c2edc99278e01b75cdb2a26f03152",
"rev": "47e5ba89f71b9e6c72eaaaaa519dd59bd6897df4",
"type": "github"
},
"original": {
@ -1921,11 +1921,11 @@
"plugin-vim-fugitive": {
"flake": false,
"locked": {
"lastModified": 1725670815,
"narHash": "sha256-ArYerBws+MBY4BpKh16J5TfVTrA0OFKPoZq7c2YQjp0=",
"lastModified": 1732036604,
"narHash": "sha256-RGS2T6tHuFPZROU0W4Z6j6wMEiJmd8xuKv3qqM3XHPI=",
"owner": "tpope",
"repo": "vim-fugitive",
"rev": "d4877e54cef67f5af4f950935b1ade19ed6b7370",
"rev": "320b18fba2a4f2fe3c8225c778c687e0d2620384",
"type": "github"
},
"original": {
@ -2001,11 +2001,11 @@
"plugin-which-key": {
"flake": false,
"locked": {
"lastModified": 1730919714,
"narHash": "sha256-5t6UnOP2+CXB55/C4YWbp2pE+xKDLMvCJK8m085Fk4w=",
"lastModified": 1732804356,
"narHash": "sha256-55RmbdN0rNG8946eIMFd5BlN82eY1GKqmHdUiC7BP+U=",
"owner": "folke",
"repo": "which-key.nvim",
"rev": "68e37e12913a66b60073906f5d3f14dee0de19f2",
"rev": "9b365a6428a9633e3eeb34dbef1b791511c54f70",
"type": "github"
},
"original": {
@ -2170,11 +2170,11 @@
]
},
"locked": {
"lastModified": 1726453838,
"narHash": "sha256-pupsow4L79SBfNwT6vh/5RAbVZuhngIA0RTCZksXmZY=",
"lastModified": 1731983527,
"narHash": "sha256-JECaBgC0pQ91Hq3W4unH6K9to8s2Zl2sPNu7bLOv4ek=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "ca2e79cd22625d214b8437c2c4080ce79bd9f7d2",
"rev": "71287228d96e9568e1e70c6bbfa3f992d145947b",
"type": "github"
},
"original": {

View file

@ -1,7 +1,23 @@
{lib, ...}: let
inherit (lib.modules) mkRemovedOptionModule mkRenamedOptionModule;
inherit (lib.lists) concatLists;
inherit (lib.nvim.config) batchRenameOptions;
renamedVimOpts = batchRenameOptions ["vim"] ["vim" "options"] {
colourTerm = "termguicolors";
mouseSupport = "mouse";
cmdHeight = "cmdheight";
updateTime = "updatetime";
mapTimeout = "tm";
cursorlineOpt = "cursorlineopt";
splitBelow = "splitbelow";
splitRight = "splitright";
autoIndent = "autoindent";
wordWrap = "wrap";
};
in {
imports = [
imports = concatLists [
[
# 2024-06-06
(mkRemovedOptionModule ["vim" "tidal"] ''
Tidalcycles language support has been removed as of 2024-06-06 as it was long unmaintained. If
@ -59,10 +75,19 @@ in {
With Trouble having so many different modes, and breaking changes
upstream, it no longer makes sense, nor works, to toggle only Trouble.
'')
# 2024-11-30
(mkRemovedOptionModule ["vim" "leaderKey"] ''
This has been deprecated in favor of using the more generic `vim.globals`
(you can use `vim.globals.mapleader` to change this instead).
(mkRenamedOptionModule ["vim" "leaderKey"] ["vim" "globals" "mapleader"])
(mkRemovedOptionModule ["vim" "tabWidth"] ''
Previous behaviour of this option was confusing and undocumented. Please set
`tabstop` and `shiftwidth` manually in `vim.options` or per-filetype in a
`ftplugin` directory added to your runtime path.
'')
]
# 2024-12-1
# Migrated via batchRenameOptions. Further batch renames must be below this line.
renamedVimOpts
];
}

View file

@ -3,23 +3,18 @@
lib,
...
}: let
inherit (lib.options) mkOption mkEnableOption literalExpression literalMD;
inherit (lib.options) mkOption mkEnableOption literalMD;
inherit (lib.strings) optionalString;
inherit (lib.types) enum bool str int either;
inherit (lib.generators) mkLuaInline;
inherit (lib.nvim.dag) entryAfter;
inherit (lib.nvim.binds) pushDownDefault;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.types) luaInline;
cfg = config.vim;
in {
options.vim = {
colourTerm = mkOption {
type = bool;
default = true;
description = "Set terminal up for 256 colours";
};
disableArrows = mkOption {
type = bool;
default = false;
@ -38,12 +33,6 @@ in {
description = "Start scrolling this number of lines from the top or bottom of the page.";
};
wordWrap = mkOption {
type = bool;
default = true;
description = "Enable word wrapping.";
};
syntaxHighlighting = mkOption {
type = bool;
default = !config.vim.treesitter.highlight.enable;
@ -56,24 +45,10 @@ in {
description = "Make use of the clipboard for default yank and paste operations. Don't use * and +";
};
mouseSupport = mkOption {
type = enum ["a" "n" "v" "i" "c"];
default = "a";
description = ''
Set modes for mouse support.
* a - all
* n - normal
* v - visual
* i - insert
* c - command
'';
};
lineNumberMode = mkOption {
type = enum ["relative" "number" "relNumber" "none"];
default = "relNumber";
example = literalExpression "none";
example = "none";
description = "How line numbers are displayed.";
};
@ -83,30 +58,6 @@ in {
description = "Prevent swapfile and backupfile from being created";
};
tabWidth = mkOption {
type = int;
default = 4;
description = "Set the width of tabs";
};
autoIndent = mkOption {
type = bool;
default = true;
description = "Enable auto indent";
};
cmdHeight = mkOption {
type = int;
default = 1;
description = "Height of the command pane";
};
updateTime = mkOption {
type = int;
default = 300;
description = "The number of milliseconds till Cursor Hold event is fired";
};
showSignColumn = mkOption {
type = bool;
default = true;
@ -119,36 +70,12 @@ in {
description = "Set how bells are handled. Options: on, visual or none";
};
mapTimeout = mkOption {
type = int;
default = 500;
description = "Timeout in ms that neovim will wait for mapped action to complete";
};
splitBelow = mkOption {
type = bool;
default = true;
description = "New splits will open below instead of on top";
};
splitRight = mkOption {
type = bool;
default = true;
description = "New splits will open to the right";
};
enableEditorconfig = mkOption {
type = bool;
default = true;
description = "Follow editorconfig rules in current directory";
};
cursorlineOpt = mkOption {
type = enum ["line" "screenline" "number" "both"];
default = "line";
description = "Highlight the text line of the cursor with CursorLine hl-CursorLine";
};
searchCase = mkOption {
type = enum ["ignore" "smart" "sensitive"];
default = "sensitive";
@ -175,44 +102,35 @@ in {
};
};
config = {
vim.luaConfigRC.basic = entryAfter ["globalsScript"] ''
config.vim = {
# Set options that were previously interpolated in 'luaConfigRC.basic' as vim.options (vim.o)
# and 'vim.globals' (vim.g). Future options, if possible, should be added here instead of the
# luaConfigRC section below.
options = pushDownDefault {
encoding = "utf-8";
hidden = true;
expandtab = true;
};
globals = pushDownDefault {
editorconfig = cfg.enableEditorconfig;
};
# Options that are more difficult to set through 'vim.options'. Fear not, though
# as the Lua DAG is still as powerful as it could be.
luaConfigRC.basic = entryAfter ["globalsScript"] ''
-- Settings that are set for everything
vim.o.encoding = "utf-8"
vim.o.hidden = true
vim.opt.shortmess:append("c")
vim.o.expandtab = true
vim.o.mouse = ${toLuaObject cfg.mouseSupport}
vim.o.tabstop = ${toLuaObject cfg.tabWidth}
vim.o.shiftwidth = ${toLuaObject cfg.tabWidth}
vim.o.softtabstop = ${toLuaObject cfg.tabWidth}
vim.o.cmdheight = ${toLuaObject cfg.cmdHeight}
vim.o.updatetime = ${toLuaObject cfg.updateTime}
vim.o.tm = ${toLuaObject cfg.mapTimeout}
vim.o.cursorlineopt = ${toLuaObject cfg.cursorlineOpt}
vim.o.scrolloff = ${toLuaObject cfg.scrollOffset}
${optionalString cfg.undoFile.enable ''
vim.o.undofile = true
vim.o.undodir = ${toLuaObject cfg.undoFile.path}
''}
${optionalString cfg.splitBelow ''
vim.o.splitbelow = true
''}
${optionalString cfg.splitRight ''
vim.o.splitright = true
''}
${optionalString cfg.showSignColumn ''
vim.o.signcolumn = "yes"
''}
${optionalString cfg.autoIndent ''
vim.o.autoindent = true
''}
${optionalString cfg.preventJunkFiles ''
vim.o.swapfile = false
vim.o.backup = false
@ -253,23 +171,11 @@ in {
vim.cmd("syntax on")
''}
${optionalString (!cfg.wordWrap) ''
vim.o.wrap = false
''}
${optionalString cfg.hideSearchHighlight ''
vim.o.hlsearch = false
vim.o.incsearch = true
''}
${optionalString cfg.colourTerm ''
vim.o.termguicolors = true
''}
${optionalString (!cfg.enableEditorconfig) ''
vim.g.editorconfig = false
''}
${optionalString (cfg.searchCase == "ignore") ''
vim.o.smartcase = false
vim.o.ignorecase = true

View file

@ -5,7 +5,7 @@
}: let
inherit (lib.options) mkOption mkEnableOption literalMD literalExpression;
inherit (lib.strings) optionalString;
inherit (lib.types) str attrs lines listOf either path;
inherit (lib.types) str bool int enum attrsOf lines listOf either path submodule anything;
inherit (lib.nvim.types) dagOf;
inherit (lib.nvim.lua) listToLuaTable;
@ -100,11 +100,24 @@ in {
};
globals = mkOption {
type = attrs;
default = {
mapleader = " ";
maplocalleader = ",";
default = {};
type = submodule {
freeformType = attrsOf anything;
options = {
mapleader = mkOption {
type = str;
default = " ";
description = "The key used for `<leader>` mappings";
};
maplocalleader = mkOption {
type = str;
default = ",";
description = "The key used for `<localleader>` mappings";
};
};
};
example = {"some_variable" = 42;};
description = ''
An attribute set containing global variable values
@ -122,8 +135,80 @@ in {
};
options = mkOption {
type = attrs;
default = {};
type = submodule {
freeformType = attrsOf anything;
options = {
termguicolors = mkOption {
type = bool;
default = true;
description = "Set terminal up for 256 colours";
};
mouse = mkOption {
type = enum ["a" "n" "v" "i" "c"];
default = "a";
description = ''
Set modes for mouse support.
* a - all
* n - normal
* v - visual
* i - insert
* c - command
'';
};
cmdheight = mkOption {
type = int;
default = 1;
description = "Height of the command pane";
};
updatetime = mkOption {
type = int;
default = 300;
description = "The number of milliseconds till Cursor Hold event is fired";
};
tm = mkOption {
type = int;
default = 500;
description = "Timeout in ms that Neovim will wait for mapped action to complete";
};
cursorlineopt = mkOption {
type = enum ["line" "screenline" "number" "both"];
default = "line";
description = "Highlight the text line of the cursor with CursorLine hl-CursorLine";
};
splitbelow = mkOption {
type = bool;
default = true;
description = "New splits will open below instead of on top";
};
splitright = mkOption {
type = bool;
default = true;
description = "New splits will open to the right";
};
autoindent = mkOption {
type = bool;
default = true;
description = "Enable auto indent";
};
wrap = mkOption {
type = bool;
default = true;
description = "Enable word wrapping.";
};
};
};
example = {visualbell = true;};
description = ''
An attribute set containing vim options to be set