mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-11 15:33:18 +00:00
Merge a0f40a0d07 into 0b92b1783d
This commit is contained in:
commit
3a8dcb3854
8 changed files with 64 additions and 13 deletions
|
|
@ -60,8 +60,9 @@ Vimscript) for the same autocommand. Choose one.
|
|||
**Examples:**
|
||||
|
||||
```nix
|
||||
{ lib, ... }:
|
||||
{
|
||||
{ lib, ... }: let
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
in {
|
||||
vim.augroups = [ { name = "UserSetup"; } ];
|
||||
|
||||
vim.autocmds = [
|
||||
|
|
@ -71,7 +72,7 @@ Vimscript) for the same autocommand. Choose one.
|
|||
pattern = [ "*.lua" ];
|
||||
group = "UserSetup";
|
||||
desc = "Notify after saving Lua file";
|
||||
callback = lib.generators.mkLuaInline ''
|
||||
callback = mkLuaInline ''
|
||||
function()
|
||||
vim.notify("Lua file saved!", vim.log.levels.INFO)
|
||||
end
|
||||
|
|
@ -101,7 +102,7 @@ Vimscript) for the same autocommand. Choose one.
|
|||
event = [ "BufWinEnter" ];
|
||||
pattern = [ "*" ];
|
||||
desc = "Simple greeting on entering a buffer window";
|
||||
callback = lib.generators.mkLuaInline ''
|
||||
callback = mkLuaInline ''
|
||||
function(args)
|
||||
print("Entered buffer: " .. args.buf)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ order to configure the added plugin,
|
|||
in {
|
||||
# luaConfigRC takes Lua configuration verbatim and inserts it at an arbitrary
|
||||
# position by default or if 'entryAnywhere' is used.
|
||||
vim.luaConfigRC.aerial-nvim= entryAnywhere ''
|
||||
vim.luaConfigRC.aerial-nvim = entryAnywhere ''
|
||||
require('aerial').setup {
|
||||
-- your configuration here
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,15 @@ In the following example, we are creating a custom injection, to highlight the
|
|||
Lua string after `mkLuaInline`.
|
||||
|
||||
```nix
|
||||
foo = mkLuaInline ''
|
||||
function bar()
|
||||
return 'foobar'
|
||||
end
|
||||
'';
|
||||
let
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
in {
|
||||
foo = mkLuaInline ''
|
||||
function bar()
|
||||
return 'foobar'
|
||||
end
|
||||
'';
|
||||
}
|
||||
```
|
||||
|
||||
```nix
|
||||
|
|
|
|||
|
|
@ -650,9 +650,11 @@ As you've seen above, `toLuaObject` is used to convert our nix attrSet
|
|||
that return specific values as expected by the plugins.
|
||||
|
||||
```nix
|
||||
{
|
||||
let
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
in {
|
||||
vim.your-plugin.setupOpts = {
|
||||
on_init = lib.generators.mkLuaInline ''
|
||||
on_init = mkLuaInline ''
|
||||
function()
|
||||
print('we can write lua!')
|
||||
end
|
||||
|
|
|
|||
|
|
@ -323,6 +323,8 @@
|
|||
|
||||
[Snoweuph](https://github.com/snoweuph)
|
||||
|
||||
- Use nvf nix Tree-sitter injections in the docs.
|
||||
|
||||
- Allow the usage of `pks.tree-sitter-grammars` in
|
||||
{option}`vim.treesitter.grammars` and language module tree-sitter package
|
||||
options created via `mkGrammarOption`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue