mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-03-21 03:46:37 +00:00
Merge pull request #1460 from tlvince/treesitter/folds
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate documentation builds-1 (push) Waiting to run
Treewide Checks / Validate documentation builds-2 (push) Waiting to run
Treewide Checks / Validate documentation builds-3 (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate documentation builds-1 (push) Waiting to run
Treewide Checks / Validate documentation builds-2 (push) Waiting to run
Treewide Checks / Validate documentation builds-3 (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
This commit is contained in:
commit
618cbe6aac
3 changed files with 10 additions and 7 deletions
|
|
@ -22,7 +22,6 @@
|
||||||
```
|
```
|
||||||
|
|
||||||
Some other settings and commands are now deprecated but are still supported.
|
Some other settings and commands are now deprecated but are still supported.
|
||||||
|
|
||||||
- The `setupOpts.mappings` options were also removed. Use the built-in Neovim
|
- The `setupOpts.mappings` options were also removed. Use the built-in Neovim
|
||||||
settings (nvf's {option}`vim.keymaps`)
|
settings (nvf's {option}`vim.keymaps`)
|
||||||
|
|
||||||
|
|
@ -35,7 +34,6 @@
|
||||||
- "Correct `languages.go.treesitter` to contain all Go file types.
|
- "Correct `languages.go.treesitter` to contain all Go file types.
|
||||||
`languages.go.treesitter.package` is now `languages.go.treesitter.goPackage`.
|
`languages.go.treesitter.package` is now `languages.go.treesitter.goPackage`.
|
||||||
New are:
|
New are:
|
||||||
|
|
||||||
- `languages.go.treesitter.goPackage`.
|
- `languages.go.treesitter.goPackage`.
|
||||||
|
|
||||||
- `languages.go.treesitter.gomodPackage`.
|
- `languages.go.treesitter.gomodPackage`.
|
||||||
|
|
@ -70,7 +68,7 @@
|
||||||
following:
|
following:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
(class: "nixos") cannot be imported into a module
|
(class: "nixos") cannot be imported into a module
|
||||||
evaluation that expects class "darwin".
|
evaluation that expects class "darwin".
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -165,7 +163,9 @@
|
||||||
- Mappings are now expected to be set using the built-in Neovim APIs,
|
- Mappings are now expected to be set using the built-in Neovim APIs,
|
||||||
managed by `vim.keymaps` in nvf, instead of `mappings` options.
|
managed by `vim.keymaps` in nvf, instead of `mappings` options.
|
||||||
- Some option defaults have changed.
|
- Some option defaults have changed.
|
||||||
|
|
||||||
- And more.
|
- And more.
|
||||||
|
|
||||||
- Automatically configure an enabled picker in the order mentioned above, if
|
- Automatically configure an enabled picker in the order mentioned above, if
|
||||||
any are enabled.
|
any are enabled.
|
||||||
- Add integration with `snacks.image` for rendering workspace/vault assets.
|
- Add integration with `snacks.image` for rendering workspace/vault assets.
|
||||||
|
|
@ -318,4 +318,8 @@ https://github.com/gorbit99/codewindow.nvim
|
||||||
|
|
||||||
- Fix `vim.formatter.conform-nvim.setupOpts.formatters` type for correct merging
|
- Fix `vim.formatter.conform-nvim.setupOpts.formatters` type for correct merging
|
||||||
|
|
||||||
|
[tlvince](https://github.com/tlvince):
|
||||||
|
|
||||||
|
- Added configuration option for `foldenable`
|
||||||
|
|
||||||
<!-- vim: set textwidth=80: -->
|
<!-- vim: set textwidth=80: -->
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.lists) optionals;
|
inherit (lib.lists) optionals;
|
||||||
inherit (lib.nvim.dag) entryAfter;
|
inherit (lib.nvim.dag) entryAfter;
|
||||||
|
inherit (lib.trivial) boolToString;
|
||||||
|
|
||||||
cfg = config.vim.treesitter;
|
cfg = config.vim.treesitter;
|
||||||
in {
|
in {
|
||||||
|
|
@ -54,10 +55,7 @@ in {
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.wo[0][0].foldmethod = "expr"
|
vim.wo[0][0].foldmethod = "expr"
|
||||||
vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||||
-- This is optional, but is set rather as a sane default.
|
vim.o.foldenable = ${boolToString cfg.foldByDefault}
|
||||||
-- If unset, opened files will be folded by automatically as
|
|
||||||
-- the files are opened
|
|
||||||
vim.o.foldenable = false
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
''}
|
''}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ in {
|
||||||
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
||||||
|
|
||||||
fold = mkEnableOption "fold with treesitter";
|
fold = mkEnableOption "fold with treesitter";
|
||||||
|
foldByDefault = mkEnableOption "folding by default when a file is opened";
|
||||||
autotagHtml = mkEnableOption "autoclose and rename html tag";
|
autotagHtml = mkEnableOption "autoclose and rename html tag";
|
||||||
|
|
||||||
grammars = mkOption {
|
grammars = mkOption {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue