Skip to content

Commit

Permalink
Showing 6 changed files with 129 additions and 5 deletions.
87 changes: 87 additions & 0 deletions fnl/dropbar.fnl
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
(let [M (setmetatable {:utils (require :dropbar.utils)
:api (require :dropbar.api)
:sources (require :dropbar.sources)}
{:__index (require :dropbar)})
general {:update_events {:win [:CursorMoved :InsertLeave :WinResized]
:buf [:BufModifiedSet :FileChangedShellPost]
:global [:DirChanged :VimResized]}}
icons (let [kinds {:use_devicons true
:symbols {:Array ""
:Boolean ""
:BreakStatement ""
:Call ""
:CaseStatement ""
:Class ""
:Color ""
:Constant ""
:Constructor ""
:ContinueStatement ""
:Copilot ""
:Declaration ""
:Delete ""
:DoStatement ""
:Enum ""
:EnumMember ""
:Event ""
:Field ""
:File ""
:Folder ""
:ForStatement ""
:Function ""
:H1Marker ""
:H2Marker ""
:H3Marker ""
:H4Marker ""
:H5Marker ""
:H6Marker ""
:Identifier ""
:IfStatement ""
:Interface ""
:Keyword ""
:List ""
:Log ""
:Lsp ""
:Macro ""
:MarkdownH1 ""
:MarkdownH2 ""
:MarkdownH3 ""
:MarkdownH4 ""
:MarkdownH5 ""
:MarkdownH6 ""
:Method ""
:Module ""
:Namespace ""
:Null ""
:Number ""
:Object ""
:Operator ""
:Package ""
:Pair ""
:Property ""
:Reference ""
:Regex ""
:Repeat ""
:Scope ""
:Snippet ""
:Specifier ""
:Statement ""
:String ""
:Struct ""
:SwitchStatement ""
:Terminal ""
:Text ""
:Type ""
:TypeParameter ""
:Unit ""
:Value "fnl/test"
:Variable ""
:WhileStatement ""}}
ui {:bar {:separator "  " :extends "…"}
:menu {:separator " " :indicator "  "}}]
{:enable true : kinds : ui})
bar {:sources (fn [buf _]
(print (. vim.bo buf :buftype))
(if (= (. vim.bo buf :buftype) :terminal)
[M.sources.terminal]
[M.sources.path]))}]
(M.setup {: general : icons : bar}))
1 change: 1 addition & 0 deletions fnl/hook-buffer.fnl
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@
[:gP
(lcmd "require('goto-preview').close_all_win()")
(desc "close all preview")]
[:gb (lcmd "require('dropbar.api').pick()") (desc :pick)]
;; debug
[:<F5> (lcmd "require('dap').continue()") (desc :continue)]
[:<F10> (lcmd "require('dap').step_over()") (desc "step over")]
20 changes: 20 additions & 0 deletions lua/autogen/dropbar.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lua/autogen/hook-buffer.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions main/default.nix
Original file line number Diff line number Diff line change
@@ -123,15 +123,16 @@ let
neogen
;
inherit (callPackage ./style.nix { })
glance
dressing
NeoZoom
ambiwidth
codewindow
colorizer
dressing
dropbar
glance
heirline
NeoZoom
notify
noice
notify
numb
statuscol
tint
15 changes: 15 additions & 0 deletions main/style.nix
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ let
motion = callPackage ./motion.nix { };
search = callPackage ./search.nix { };
treesitter = callPackage ./treesitter.nix { };
language = callPackage ./language.nix { };
in
with pkgs.vimPlugins;
rec {
@@ -116,5 +117,19 @@ rec {
code = read ../lua/autogen/winsep.lua;
args.exclude_ft_path = ../lua/autogen/exclude_ft.lua;
};
hooks.events = [ "WinNew" ];
};
dropbar = {
package = dropbar-nvim;
depends = [
language.lsp
search.telescope
treesitter.treesitter
];
postConfig = read ../lua/autogen/dropbar.lua;
hooks = {
userEvents = [ "SpecificFileEnter" ];
modules = [ "dropbar.api" ];
};
};
}

0 comments on commit 2d68bd2

Please sign in to comment.