feat: neotab.nvim

This commit is contained in:
punkfairie 2024-12-08 18:10:07 -08:00
parent b4b493f656
commit 68f0530548
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
5 changed files with 64 additions and 13 deletions

View file

@ -280,6 +280,22 @@
"type": "github"
}
},
"neotab-nvim": {
"flake": false,
"locked": {
"lastModified": 1733176083,
"narHash": "sha256-5IJQwZxDGDMM6KBWKU/EZwa5wciHeTXOZgHPCRmlxJk=",
"owner": "kawre",
"repo": "neotab.nvim",
"rev": "f6ed1ef49f32586f5db95edae5d6f264c8180d85",
"type": "github"
},
"original": {
"owner": "kawre",
"repo": "neotab.nvim",
"type": "github"
}
},
"neovim-nightly": {
"inputs": {
"flake-compat": "flake-compat_2",
@ -385,6 +401,7 @@
"inputs": {
"flake-utils": "flake-utils",
"gen-luarc": "gen-luarc",
"neotab-nvim": "neotab-nvim",
"neovim-nightly": "neovim-nightly",
"nixpkgs": "nixpkgs_2"
}

View file

@ -11,11 +11,10 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# Add bleeding-edge plugins here.
# wf-nvim = {
# url = "github:Cassin01/wf.nvim";
# flake = false;
# };
neotab-nvim = {
url = "github:kawre/neotab.nvim";
flake = false;
};
};
outputs = inputs @ {

View file

@ -4,11 +4,11 @@ with final.pkgs.lib; let
pkgs = final;
# Use this to create a plugin from a flake input
# mkNvimPlugin = src: pname:
# pkgs.vimUtils.buildVimPlugin {
# inherit pname src;
# version = src.lastModifiedDate;
# };
mkNvimPlugin = src: pname:
pkgs.vimUtils.buildVimPlugin {
inherit pname src;
version = src.lastModifiedDate;
};
# Make sure we use the pinned nixpkgs instance for wrapNeovimUnstable,
# otherwise it could have an incompatible signature when applying this overlay.
@ -26,9 +26,6 @@ with final.pkgs.lib; let
# ...
# }
all-plugins = with pkgs.vimPlugins; [
# bleeding-edge plugins from flake inputs
# (mkNvimPlugin inputs.wf-nvim "wf.nvim") # (example) keymap hints
# Base
lz-n
snacks-nvim
@ -58,6 +55,7 @@ with final.pkgs.lib; let
# Coding
lexima-vim
(mkNvimPlugin inputs.neotab-nvim "neotab.nvim")
# Treesitter
nvim-treesitter-textobjects

View file

@ -2,4 +2,5 @@ local req = MarleyVim.local_require('plugins.coding')
return {
req('lexima-vim'),
req('neotab-nvim'),
}

View file

@ -0,0 +1,36 @@
return {
'neotab.nvim',
event = 'InsertEnter',
after = function()
require('neotab').setup({
behavior = 'closing',
smart_punctuators = {
enabled = true,
semicolon = {
enabled = true,
ft = { 'javascript', 'typescript', 'php', 'nix' },
},
escape = {
enabled = true,
triggers = {
[','] = {
pairs = {
{ open = "'", close = "'" },
{ open = '"', close = '"' },
},
format = '%s ', -- ", "
},
['='] = {
pairs = {
{ open = '(', close = ')' },
},
ft = { 'javascript', 'typescript' },
format = ' %s> ', -- ` => `
cond = '^$', -- match only pairs with empty content
},
},
},
},
})
end,
}