Add foot and nvim

Setup zsh and starship

update yolk

test with new yolk

test2

After renaming local to eggs

Remove zed stuff

äf

äf
This commit is contained in:
elkowar 2024-11-23 20:32:34 +01:00
parent d68785f31e
commit e797b89ed9
Signed by: ElKowar
GPG key ID: 862BA3D7D7760F13
105 changed files with 154882 additions and 1 deletions

1
.gitignore vendored
View file

@ -1 +0,0 @@
/local

1
eggs/foo/yolk_templates Normal file
View file

@ -0,0 +1 @@
yolktest/foo.toml

View file

@ -0,0 +1,2 @@
# {% replace /".*"/ `"${system.username}"` %}
hostname = "elk"

View file

@ -0,0 +1,189 @@
# -*- conf -*-
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
# login-shell=no
# app-id=foot
# title=foot
# locked-title=no
# font=APL386 Unicode:size=8
font=Fira Code Nerd Font:size=12
# font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font>
# font-size-adjustment=0.5
# line-height=<font metrics>
# letter-spacing=0
# horizontal-letter-offset=0
# vertical-letter-offset=0
# underline-offset=<font metrics>
# underline-thickness=<font underline thickness>
# box-drawings-uses-font-glyphs=no
# dpi-aware=auto
# initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed
pad=15x15 center # optionally append 'center'
# resize-delay-ms=100
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
# bold-text-in-bright=no
# word-delimiters=,│`|:"'()[]{}<>
# selection-target=primary
# workers=<number of logical CPUs>
# utempter=/usr/lib/utempter/utempter
[environment]
# name=value
[bell]
urgent=no
notify=no
command-focused=no
[scrollback]
lines=100000
# multiplier=3.0
# indicator-position=relative
# indicator-format=""
[url]
# launch=xdg-open ${url}
# label-letters=sadfjklewcmpgh
# osc8-underline=url-mode
# protocols=http, https, ftp, ftps, file, gemini, gopher
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
[cursor]
style=block
# color=<inverse foreground/background>
# blink=no
# beam-thickness=1.5
# underline-thickness=<font underline thickness>
[mouse]
hide-when-typing=yes
# alternate-scroll-mode=yes
[colors]
#background=1d2021
background=282828
foreground=ebdbb2
#regular0=282828
regular0=665c54
regular1=cc241d
regular2=98971a
regular3=d79921
regular4=458588
regular5=b16286
regular6=689d6a
regular7=a89984
bright0=928374
bright1=fb4934
bright2=b8bb26
bright3=fabd2f
bright4=83a598
bright5=d3869b
bright6=8ec07c
bright7=ebdbb2
# alpha=1.0
# background=002b36
# foreground=839496
## Misc colors
# selection-foreground=<inverse foreground/background>
# selection-background=<inverse foreground/background>
# jump-labels=<regular0> <regular3> # black-on-yellow
# scrollback-indicator=<regular0> <bright4> # black-on-bright-blue
# search-box-no-match=<regular0> <regular1> # black-on-red
# search-box-match=<regular0> <regular3> # black-on-yellow
# urls=<regular3>
[csd]
# preferred=server
# size=26
# font=<primary font>
# color=<foreground color>
# hide-when-typing=no
# border-width=0
# border-color=<csd.color>
# button-width=26
# button-color=<background color>
# button-minimize-color=<regular4>
# button-maximize-color=<regular2>
# button-close-color=<regular1>
[key-bindings]
# scrollback-up-page=Shift+Page_Up
# scrollback-up-half-page=none
# scrollback-up-line=none
# scrollback-down-page=Shift+Page_Down
# scrollback-down-half-page=none
# scrollback-down-line=none
# clipboard-copy=Control+Shift+c XF86Copy
# clipboard-paste=Control+Shift+v XF86Paste
# primary-paste=Shift+Insert
# search-start=Control+Shift+r
# font-increase=Control+plus Control+equal Control+KP_Add
# font-decrease=Control+minus Control+KP_Subtract
# font-reset=Control+0 Control+KP_0
# spawn-terminal=Control+Shift+n
# minimize=none
# maximize=none
# fullscreen=none
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
# pipe-selected=[xargs -r firefox] none
# show-urls-launch=Control+Shift+u
# show-urls-copy=none
# show-urls-persistent=none
# prompt-prev=Control+Shift+z
# prompt-next=Control+Shift+x
# unicode-input=none
# noop=none
[search-bindings]
# cancel=Control+g Control+c Escape
# commit=Return
# find-prev=Control+r
# find-next=Control+s
# cursor-left=Left Control+b
# cursor-left-word=Control+Left Mod1+b
# cursor-right=Right Control+f
# cursor-right-word=Control+Right Mod1+f
# cursor-home=Home Control+a
# cursor-end=End Control+e
# delete-prev=BackSpace
# delete-prev-word=Mod1+BackSpace Control+BackSpace
# delete-next=Delete
# delete-next-word=Mod1+d Control+Delete
# extend-to-word-boundary=Control+w
# extend-to-next-whitespace=Control+Shift+w
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
# primary-paste=Shift+Insert
# unicode-input=none
[url-bindings]
# cancel=Control+g Control+c Control+d Escape
# toggle-url-visible=t
[text-bindings]
# \x03=Mod4+c # Map Super+c -> Ctrl+c
[mouse-bindings]
# selection-override-modifiers=Shift
# primary-paste=BTN_MIDDLE
# select-begin=BTN_LEFT
# select-begin-block=Control+BTN_LEFT
# select-extend=BTN_RIGHT
# select-extend-character-wise=Control+BTN_RIGHT
# select-word=BTN_LEFT-2
# select-word-whitespace=Control+BTN_LEFT-2
# select-row=BTN_LEFT-3
# vim: ft=dosini

2
eggs/nvim/.config/nvim/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
plugin
lua-old

View file

@ -0,0 +1,2 @@
{}

View file

@ -0,0 +1,38 @@
{:bg_main (if (= "epix" (vim.fn.hostname)) "#1d2021" "#282828")
:bg_second (if (= "epix" (vim.fn.hostname)) "#181A1B" "#1d2021")
:dark0_hard "#1d2021"
:dark0 "#282828"
:dark0_soft "#32302f"
:dark1 "#3c3836"
:dark2 "#504945"
:dark3 "#665c54"
:dark4 "#7c6f64"
:light0_hard "#f9f5d7"
:light0 "#fbf1c7"
:light0_soft "#f2e5bc"
:light1 "#ebdbb2"
:light2 "#d5c4a1"
:light3 "#bdae93"
:light4 "#a89984"
:bright_red "#fb4934"
:bright_green "#b8bb26"
:bright_yellow "#fabd2f"
:bright_blue "#83a598"
:bright_purple "#d3869b"
:bright_aqua "#8ec07c"
:bright_orange "#fe8019"
:neutral_red "#cc241d"
:neutral_green "#98971a"
:neutral_yellow "#d79921"
:neutral_blue "#458588"
:neutral_purple "#b16286"
:neutral_aqua "#689d6a"
:neutral_orange "#d65d0e"
:faded_red "#9d0006"
:faded_green "#79740e"
:faded_yellow "#b57614"
:faded_blue "#076678"
:faded_purple "#8f3f71"
:faded_aqua "#427b58"
:faded_orange "#af3a03"
:gray "#928374"}

View file

@ -0,0 +1,194 @@
(local {: autoload : a : str : utils} (require :dots.prelude))
(local wk (autoload :which-key))
(local glance (autoload :glance))
(local crates (autoload :crates))
(local dap (autoload :dap))
(local dapui (autoload :dapui))
; undo autopairs fuckup
(set vim.g.AutoPairsShortcutBackInsert "<M-b>")
(utils.keymap :n :K "<Nop>")
(utils.keymap :v :K "<Nop>")
(utils.keymap :i "" "<C-w>")
(utils.keymap :i :<C-h> "<C-w>")
(utils.keymap :i :<C-BS> "<C-w>")
(utils.keymap :n :zt "zt<c-y><c-y><c-y>")
(utils.keymap :n :zb "zb<c-e><c-e><c-e>")
; these should really not be necessary, but whatever...
(utils.keymap :n :<space>c<space> "<cmd>call nerdcommenter#Comment(\"m\", \"Toggle\")<CR>" {})
(utils.keymap :v :<space>c<space> "<cmd>call nerdcommenter#Comment(\"x\", \"Toggle\")<CR>" {})
(utils.keymap :n :<C-LeftMouse> "<LeftMouse><cmd>lua vim.lsp.buf.definition()<CR>")
(utils.keymap :n :<A-LeftMouse> "<Esc><LeftMouse><cmd>lua vim.lsp.buf.hover()<CR>")
(utils.keymap [:n :v] :<space><space>c "\"+y")
;(utils.keymap :i :<C-l><C-j> "<Plug>(copilot-suggest)")
;(utils.keymap :i :<C-l><C-d> "<Plug>(copilot-dismiss)")
;(utils.keymap :i :<C-l><C-n> "<Plug>(copilot-next)")
;(utils.keymap :i :<C-l><C-p> "<Plug>(copilot-previous)")
;(utils.keymap :i :<C-l><C-o> "<cmd>Copilot panel<cr>")
(utils.keymap :n :<a-s-j> "<cmd>RustMoveItemDown<cr>j")
(utils.keymap :n :<a-s-k> "<cmd>RustMoveItemUp<cr>k")
(utils.keymap :n :<Backspace> "<cmd>HopChar2<CR>")
; Fix keybinds in linewrapped mode
;(utils.keymap [:n] :j "gj")
;(utils.keymap [:n] :k "gk")
(fn open-selection-zotero []
(let [(_ _ sel) (utils.get-selection)]
(vim.cmd (.. "silent !xdg-open zotero://select/items/@" (str.join sel)))))
(fn key-map [obj]
(icollect [key val (pairs obj)]
(utils.prepend key val)))
(fn m [bind desc]
{1 bind :desc desc})
(fn cmd [s desc] (utils.prepend (.. "<cmd>" s "<cr>") {:desc desc}))
(fn sel-cmd [s desc] (utils.prepend (.. "<cmd>'<,'>" s "<cr>") {:desc desc}))
(fn rebind [s desc] (m s desc))
(fn format []
(if (a.some #$1.server_capabilities.documentFormattingProvider (vim.lsp.get_active_clients))
(vim.lsp.buf.format {:async true})
(vim.cmd "Neoformat")))
(fn open-rename []
(vim.api.nvim_feedkeys (.. ":IncRename " (vim.fn.expand "<cword>")) "n" ""))
(fn toggle-lsp-lines []
(vim.diagnostic.config {:virtual_lines (not (. (vim.diagnostic.config) :virtual_lines))})
; TODO: this doesn't seem to work...
(vim.diagnostic.config {:virtual_text (not (. (vim.diagnostic.config) :virtual_lines))}))
(fn toggle-lsp-lines-current []
(vim.diagnostic.config {:virtual_lines {:only_current_line true}}))
(wk.setup {})
(wk.add
(key-map
{"<leader>c" {:group "+comment out"}
"<leader>e" {:group "+emmet"}
"<leader>[" (cmd "HopWord" "Hop to a word")
"<leader>h" (cmd "bprevious" "previous buffer")
"<leader>l" (cmd "bnext" "next buffer")
"<leader>o" (cmd "Telescope live_grep" "Grep files")
"<leader>P" (cmd "Telescope frecency frecency default_text=:CWD:" "Frecency magic")
"<leader>p" (cmd "Telescope find_files" "Open file-browser")
"<leader>:" (cmd "Telescope commands" "Search command with fzf")
"<leader>s" (cmd "w" "Save file")
"<leader>g" (cmd "Neogit" "Git")
"<leader>n" (m (. (require :persistence) :load) "Load last session")
"<leader>d" {:group "+Debugging"}
"<leader>db" (m dap.toggle_breakpoint "toggle breakpoint")
"<leader>du" (m dapui.toggle "toggle dapui")
"<leader>dc" (m dap.step_into "continue")
"<leader>dr" (m dap.repl.open "open repl")
"<leader>ds" {:group "+Step"}
"<leader>dso" (m dap.step_over "over")
"<leader>dsu" (m dap.step_out "out")
"<leader>dsi" (m dap.step_into "into")
"<leader>m" {:group "+Code actions"}
"<leader>m;" (m #(set vim.o.spell (not vim.o.spell)) "Toggle spell checking")
"<leader>md" (m vim.lsp.buf.hover "Show documentation")
"<leader>mo" (cmd "SymbolsOutline" "Outline")
"<leader>mS" (cmd "Telescope lsp_document_symbols" "Symbols in document")
"<leader>ms" (cmd "Telescope lsp_dynamic_workspace_symbols" "Symbols in workspace")
"<leader>mT" (m vim.lsp.buf.signature_help "Show signature help")
"<leader>mn" (m open-rename "Rename")
"<leader>mv" (cmd "CodeActionMenu" "Apply codeaction")
"<leader>mA" (m #(vim.diagnostic.open_float {:scope :cursor}) "Cursor diagnostics")
"<leader>ma" (m #(vim.diagnostic.open_float {}) "Line diagnostics")
"<leader>mh" (cmd "RustToggleInlayHints" "Toggle inlay hints")
"<leader>mr" (cmd "Trouble lsp_references" "Show references")
"<leader>mE" (cmd "Trouble document_diagnostics" "List diagnostics")
"<leader>me" (cmd "Trouble workspace_diagnostics" "Show diagnostics")
"<leader>mt" (cmd "Trouble lsp_type_definitions" "Go to type-definition")
"<leader>mi" (cmd "Trouble lsp_implementations" "Show implementation")
"<leader>mg" (cmd "Trouble lsp_definitions" "Go to definition")
"<leader>mw" (m toggle-lsp-lines "Toggle LSP lines")
"<leader>mW" (m toggle-lsp-lines-current "Toggle LSP line")
"<leader>mf" (m format "format file")
"<leader>m," (cmd "RustRunnables" "Run rust stuff")
"<leader>mx" {:group "+Glance"}
"<leader>mxd" (m #(glance.open "definitions") "Definitions")
"<leader>mxr" (m #(glance.open "references") "References")
"<leader>mxt" (m #(glance.open "type_definitions") "Type definitions")
"<leader>mxi" (m #(glance.open "implementations") "Implementations")
"<leader>c" {:group "+Crates"}
"<leader>mcj" (m crates.show_popup "crates popup")
"<leader>mcf" (m crates.show_features_popup "crate features")
"<leader>mcv" (m crates.show_versions_popup "crate versions")
"<leader>mcd" (m crates.show_dependencies_popup "crate dependencies")
"<leader>mch" (m crates.open_documentation "crate documentation")
"<leader>f" {:group "+folds"}
"<leader>fo" (cmd "foldopen" "open fold")
"<leader>fn" (cmd "foldclose" "close fold")
"<leader>fj" (rebind "zj" "jump to next fold")
"<leader>fk" (rebind "zk" "jump to previous fold")
"<leader>v" {:group "+view-and-layout"}
"<leader>vn" (cmd "set relativenumber!" "toggle relative numbers")
"<leader>vm" (cmd "set nonumber! norelativenumber" "toggle numbers")
"<leader>vg" (cmd "ZenMode" "toggle zen mode")
"<leader>vi" (cmd "IndentGuidesToggle" "toggle indent guides")
"<leader>vw" (cmd "set wrap! linebreak!" "toggle linewrapping")
"<leader>b" {:group "+buffers"}
"<leader>bb" (cmd ":Telescope buffers" "select open buffer")
"<leader>bc" (cmd ":Bdelete!" "close open buffer")
"<leader>bw" (cmd ":Bwipeout!" "wipeout open buffer")}))
(wk.add
(key-map
{"<tab>" {:hidden true}
"gss" {:desc "init selection"}
"z" {:group "folds"}
"zc" (m "<cmd>foldclose<cr>" "close fold")
"zo" (m "<cmd>foldopen<cr>" "open fold")}))
(wk.add
(key-map {"<tab>" {:hidden true :mode "i"}}))
(wk.add
(utils.prepend
(key-map
{"<leader>s" (sel-cmd "VSSplit" "keep selection visible in split")
"<leader>z" (m open-selection-zotero "open in zotero")
"gs" {:group "+Selection"}
"gsj" {:desc "increment selection"}
"gsk" {:desc "decrement selection"}
"gsl" {:desc "increment node"}
"gsh" {:desc "decrement node"}})
{:mode "v"}))
(set vim.o.timeoutlen 200)

View file

@ -0,0 +1,74 @@
(local {: autoload : a : utils : colors} (require :dots.prelude))
(local bufferline (autoload :bufferline))
(vim.cmd "hi link BufferLineTabSeparatorSelected BufferLineSeparatorSelected")
(vim.cmd "hi link BufferLineTabSeparator BufferLineSeparator")
(fn mk-active [fg]
{:bg colors.neutral_aqua :fg fg :italic false :bold false})
(fn mk-visible [fg]
{:bg colors.dark1 :fg fg :italic false :bold false})
(fn setup []
; :h bufferline-lua-highlights
(let [selected {:bg colors.neutral_aqua :fg colors.bg_main :gui "NONE"}
visible {:bg colors.dark1 :fg colors.neutral_aqua}]
(bufferline.setup
{:options
{:diagnostics "nvim_lsp"
:diagnostics_indicator (fn [cnt _lvl _diagnostics-dict] (.. " (" cnt ")"))
:show_buffer_close_icons false
:show_buffer_icons false
:show_close_icon false
:show_tab_indicators false
:enforce_regular_tabs false
:tab_size 10}
; https://github.com/akinsho/nvim-bufferline.lua/blob/4ebab39af2376b850724dd29c29579c8e024abe6/lua/bufferline/config.lua#L74
:highlights
{:fill {:bg colors.bg_main :fg colors.light0}
:background visible
:buffer_visible visible
:buffer_selected (a.assoc selected :bold false :italic false)
:modified visible :modified_visible visible :modified_selected selected
:hint visible :hint_visible visible :hint_selected selected
:info visible :info_visible visible :info_selected selected
:warning visible :warning_visible visible :warning_selected selected
:error visible :error_visible visible :error_selected selected
:duplicate visible :duplicate_visible visible :duplicate_selected selected
:diagnostic (mk-visible colors.neutral_red)
:diagnostic_visible (mk-visible colors.neutral_red)
:diagnostic_selected (mk-active colors.faded_red)
:info_diagnostic (mk-visible colors.neutral_blue)
:info_diagnostic_visible (mk-visible colors.neutral_blue)
:info_diagnostic_selected (mk-active colors.faded_blue)
:hint_diagnostic (mk-visible colors.neutral_yellow)
:hint_diagnostic_visible (mk-visible colors.neutral_yellow)
:hint_diagnostic_selected (mk-active colors.faded_orange)
:warning_diagnostic (mk-visible colors.neutral_orange)
:warning_diagnostic_visible (mk-visible colors.neutral_orange)
:warning_diagnostic_selected (mk-active colors.faded_orange)
:error_diagnostic (mk-visible colors.neutral_red)
:error_diagnostic_visible (mk-visible colors.neutral_red)
:error_diagnostic_selected (mk-active colors.red)
:separator visible
:separator_visible {:bg colors.red}
:separator_selected {:bg colors.red}
:indicator_selected {:bg colors.neutral_aqua :fg colors.neutral_aqua :italic false :bold false}
:tab_separator {:bg colors.red}
:tab_separator_selected {:bg colors.neutral_aqua :fg colors.neutral_aqua}
; stuff I've never seen before :thonk:
:pick_selected {:bg colors.bright_red :fg colors.bright_red}
:tab_selected {:bg colors.bright_green :fg colors.bright_green}
:tab {:bg colors.bright_yellow :fg colors.bright_yellow}}})))
[(utils.plugin :akinsho/nvim-bufferline.lua
{:config setup :tag "v4.7.0"})]

View file

@ -0,0 +1,70 @@
(local {: autoload : utils} (require :dots.prelude))
(local cmp (autoload :cmp))
; check this for coloring maybe
; https://github.com/hrsh7th/nvim-cmp/blob/ada9ddeff71e82ad0e52c9a280a1e315a8810b9a/lua/cmp/entry.lua#L199
(fn item-formatter [item vim-item]
(let [padding (string.rep " " (- 10 (vim.fn.strwidth vim-item.abbr)))
details (?. item :completion_item :detail)]
(when details
(set vim-item.abbr (.. vim-item.abbr padding " " details))))
vim-item)
(fn setup []
(cmp.setup
{:snippet {:expand (fn [args] ((. vim.fn :vsnip#anonymous) args.body))}
:completion {:autocomplete false}
:mapping (cmp.mapping.preset.insert
{:<C-d> (cmp.mapping.scroll_docs -4)
:<C-f> (cmp.mapping.scroll_docs 4)
:<C-space> (cmp.mapping.complete)
:<esc> #(do (cmp.mapping.close) (vim.cmd "stopinsert"))
:<CR> (cmp.mapping.confirm {:select true})})
:experimental {:custom_menu true}
:sources [{:name "nvim_lsp" :priority 5}
{:name "vsnip" :priority 3}
; {:name "omni"} ; this prints the completion thing, for some reason,....
{:name "nvim_lua"}
{:name "calc"}
{:name "path"}
{:name "nvim_lsp_signature_help"}
{:name "conventionalcommits"}
{:name "crates"}]
;{:name "buffer"}]
:formatting {:format item-formatter}
:sorting {:priority_weight 2
:comparators [#(do (if (and (= 15 ($1:get_kind)) (= 15 ($2:get_kind))) nil
(= 15 ($1:get_kind)) false
(= 15 ($2:get_kind)) true
nil)) ; 15 means "SNIPPET", see https://github.com/hrsh7th/nvim-cmp/blob/main/lua/cmp/types/lsp.lua
cmp.config.compare.offset
cmp.config.compare.exact
cmp.config.compare.score
cmp.config.compare.kind
cmp.config.compare.sort_text
cmp.config.compare.length
cmp.config.compare.order]}})
(cmp.setup.cmdline "/" {:sources [{:name :buffer}]}))
[(utils.plugin :hrsh7th/vim-vsnip {:lazy true :event ["VeryLazy"]})
(utils.plugin :hrsh7th/vim-vsnip-integ {:lazy true :event ["VeryLazy"]})
(utils.plugin :rafamadriz/friendly-snippets)
(utils.plugin :hrsh7th/nvim-cmp {:lazy true
:event ["VeryLazy"]
:dependencies [[:hrsh7th/cmp-nvim-lsp]
[:hrsh7th/cmp-buffer]
[:hrsh7th/cmp-vsnip]
[:hrsh7th/cmp-nvim-lua]
[:hrsh7th/cmp-calc]
[:hrsh7th/cmp-path]
[:hrsh7th/cmp-nvim-lsp-signature-help]
[:davidsierradz/cmp-conventionalcommits]
[:hrsh7th/cmp-omni]]
:config setup})]

View file

@ -0,0 +1,12 @@
(local utils (require :dots.utils))
;:github/copilot.vim {:cmd ["Copilot"]}
[(utils.plugin
:zbirenbaum/copilot.lua
{:cmd "Copilot"
:event "InsertEnter"
:opts {:panel {:enabled false}
:suggestion {:enabled true
:auto_trigger :true
:keymap {:accept "<tab>"
:next "<C-l><C-n>"}}}})]

View file

@ -0,0 +1,14 @@
(local {: autoload : utils} (require :dots.prelude))
(local cb (autoload :diffview.config))
(local diffview (autoload :diffview))
[(utils.plugin
:sindrets/diffview.nvim
{:cmd ["DiffviewOpen" "DiffviewToggleFiles"]
:config #(diffview.setup
{:diff_binaries false
:file_panel {:width 35
:use_icons false}
:key_bindings {:view {:<leader>dn (cb.diffview_callback "select_next_entry")
:<leader>dp (cb.diffview_callback "select_prev_entry")
:<leader>dd (cb.diffview_callback "toggle_files")}}})})]

View file

@ -0,0 +1,14 @@
(local utils (require :dots.utils))
(fn setup []
(set vim.g.user_emmet_mode "n")
(set vim.g.user_emmet_leader_key "<leader>e")
(set vim.g.user_emmet_settings {:javascript.jsx {:extends "jsx"}
:typescript.jsx {:extends "jsx"}}))
[(utils.plugin
:mattn/emmet-vim
{:lazy true
:config setup})]

View file

@ -0,0 +1,110 @@
(local {: autoload : utils : a : str : colors} (require :dots.prelude))
(local feline (autoload :feline))
(fn setup []
(set vim.opt.termguicolors true)
(local modes
{:n {:text "NORMAL" :color colors.neutral_aqua}
:i {:text "INSERT" :color colors.neutral_yellow}
:c {:text "CMMAND" :color colors.neutral_aqua}
:ce {:text "NORMEX" :color colors.neutral_aqua}
:cv {:text "EX" :color colors.neutral_aqua}
:ic {:text "INSCOMP" :color colors.neutral_aqua}
:no {:text "OP-PENDING" :color colors.neutral_aqua}
:r {:text "HIT-ENTER" :color colors.neutral_aqua}
:r? {:text "CONFIRM" :color colors.neutral_aqua}
:R {:text "REPLACE" :color colors.neutral_aqua}
:Rv {:text "VIRTUAL" :color colors.neutral_aqua}
:s {:text "SELECT" :color colors.neutral_aqua}
:S {:text "SELECT" :color colors.neutral_aqua}
:t {:text "TERM" :color colors.neutral_aqua}
:v {:text "VISUAL" :color colors.neutral_blue}
:V {:text "VISUAL LINE" :color colors.neutral_blue}
"" {:text "VISUAL BLOCK" :color colors.neutral_blue}})
(local bar-bg colors.bg_main)
(local horiz-separator-color colors.light1)
(fn or-empty [x] (or x ""))
(fn spaces [x] (if x (.. " " x " ") ""))
(fn get-current-filepath []
(let [file (utils.shorten-path (vim.fn.bufname) 30 30)]
(if (a.empty? file) ""
vim.bo.readonly (.. "RO " file)
(and vim.bo.modifiable vim.bo.modified) (.. file " ●")
(.. file " "))))
(fn vim-mode-hl [use-as-fg?]
(let [color (. modes (vim.fn.mode) :color)]
(if use-as-fg? {:bg bar-bg :fg color} {:bg color :fg bar-bg})))
(fn git-status-provider []
(or-empty (utils.keep-if #(~= "master" $1)
(?. vim.b :gitsigns_status_dict :head))))
(fn vim-mode []
(.. " " (or (. modes (vim.fn.mode) :text) vim.fn.mode) " "))
;(fn lsp-progress-provider []
;(let [msgs (vim.lsp.util.get_progress_messages)
;s (icollect [_ msg (ipairs msgs)]
;(when msg.message
;(.. msg.title " " msg.message)))]
;(or-empty (str.join " | " s))))
(fn lsp-progress-provider []
(vim.lsp.status))
(fn lsp-diagnostic-component [kind color]
{:enabled #(~= 0 (length (vim.diagnostic.get 0 {:severity kind})))
:provider #(spaces (length (vim.diagnostic.get 0 {:severity kind})))
:left_sep ""
:right_sep ""
:hl {:fg bar-bg :bg color}})
(fn coordinates []
(let [[line col] (vim.api.nvim_win_get_cursor 0)]
(.. " " line ":" col " ")))
; Fills the bar with an horizontal line
(fn inactive-separator-provider []
(if (not= (vim.fn.winnr) (vim.fn.winnr :j))
(string.rep "─" (vim.api.nvim_win_get_width 0))
""))
(local components {:active {} :inactive {}})
(tset components.active 1
[{:provider vim-mode :hl #(vim-mode-hl false)}
{:provider get-current-filepath :left_sep " " :hl {:fg colors.light4}}
{:provider git-status-provider :left_sep " " :hl #(vim-mode-hl true)}])
(tset components.active 2
[{:provider lsp-progress-provider
:left_sep " "
:right_sep " "
:enabled #(< 0 (length (vim.lsp.buf_get_clients)))}])
(tset components.active 3
[{:provider vim.bo.filetype :right_sep " " :hl #(vim-mode-hl true)}
(lsp-diagnostic-component vim.diagnostic.severity.INFO colors.neutral_green)
(lsp-diagnostic-component vim.diagnostic.severity.HINT colors.neutral_aqua)
(lsp-diagnostic-component vim.diagnostic.severity.WARN colors.neutral_yellow)
(lsp-diagnostic-component vim.diagnostic.severity.ERROR colors.neutral_red)
{:provider coordinates :hl #(vim-mode-hl false)}])
(tset components.inactive 1
[{:provider inactive-separator-provider
:hl {:bg "NONE" :fg horiz-separator-color}}])
(utils.highlight-add :StatusLineNC {:bg "NONE" :fg colors.light1})
(feline.setup {:theme {:fg colors.light1 :bg colors.bg_main}
:components components}))
[(utils.plugin :Famiu/feline.nvim {:config setup})]

View file

@ -0,0 +1,7 @@
(local {: autoload : utils} (require :dots.prelude))
; (local flutter-tools (autoload :flutter-tools)))
[(utils.plugin :akinsho/flutter-tools.nvim
{:config true
:lazy false
:dependencies ["nvim-lua/plenary.nvim" "stevearc/dressing.nvim"]})]

View file

@ -0,0 +1,26 @@
(local {: autoload} (require :nfnl.module))
(local utils (autoload :dots.utils))
(local gitsigns (autoload :gitsigns))
(fn setup []
(gitsigns.setup
{:signs {:add {:text "▍"}
:change {:text "▍"}
:delete {:text "▍"}
:topdelete {:text "▍"}
:changedelete {:text "▍"}}
; :keymaps {:noremap true
; :buffer true}
:current_line_blame false
:update_debounce 100})
(let [scrollbar-gitsigns (require "scrollbar.handlers.gitsigns")]
(scrollbar-gitsigns.setup)))
[(utils.plugin
:lewis6991/gitsigns.nvim
{:dependencies [:vim-gruvbox8
:petertriho/nvim-scrollbar]
:config setup})]

View file

@ -0,0 +1,145 @@
(local {: autoload} (require :nfnl.module))
(local utils (autoload :dots.utils))
(local colors (autoload :dots.colors))
(fn setup []
(set vim.g.gruvbox_italics 0)
(set vim.g.gruvbox_italicise_strings 0)
(set vim.g.gruvbox_filetype_hi_groups 1)
(set vim.g.gruvbox_plugin_hi_groups 1)
(fn setup-colors []
(utils.highlight-add
["GruvboxBlueSign" "GruvboxAquaSign" "GruvboxRedSign" "GruvboxYellowSign" "GruvboxGreenSign" "GruvboxOrangeSign" "GruvboxPurpleSign"]
{:bg "NONE"})
; hide empty line ~'s
(utils.highlight :EndOfBuffer {:bg "NONE" :fg colors.bg_main})
(utils.highlight :LineNr {:bg "NONE"})
(utils.highlight-add :Pmenu {:bg colors.bg_second})
(utils.highlight-add :PmenuSel {:bg colors.bright_aqua})
(utils.highlight-add :PmenuSbar {:bg colors.bg_second})
(utils.highlight-add :PmenuThumb {:bg colors.dark1})
(utils.highlight-add :NormalFloat {:bg colors.bg_second})
(utils.highlight-add :SignColumn {:bg colors.bg_main})
(utils.highlight-add :FloatBorder {:bg colors.bg_second})
(utils.highlight-add :SpecialComment {:fg colors.dark4})
(utils.highlight-add
[:LspDiagnosticsSignError :LspDiagnosticsSignWarning :LspDiagnosticsSignInformation :LspDiagnosticsSignHint]
{:bg "NONE"})
(utils.highlight-add :DiagnosticError {:fg colors.bright_red})
(utils.highlight-add :DiagnosticWarning {:fg colors.bright_orange})
(utils.highlight-add :DiagnosticInformation {:fg colors.bright_aqua})
(utils.highlight-add :DiagnosticHint {:fg colors.bright_yellow})
(utils.highlight-add :DiagnosticVirtualTextError {:bg "#342828" :fg colors.bright_red})
(utils.highlight-add :DiagnosticVirtualTextWarning {:bg "#473027" :fg colors.bright_orange})
(utils.highlight-add :DiagnosticVirtualTextWarning {:bg "#3b2c28" :fg colors.bright_orange})
(utils.highlight-add :DiagnosticVirtualTextInformation {:bg "#272d2f" :fg colors.bright_aqua})
(utils.highlight-add :DiagnosticVirtualTextHint {:bg "#272d2f" :fg colors.bright_yellow})
(utils.highlight :LspDiagnosticsUnderlineError {:gui "undercurl"})
;(vim.fn.sign_localine :LspDiagnosticsSignError {:text "◆"})
;(vim.fn.sign_localine :LspDiagnosticsSignWarning {:text "◆"})
;(vim.fn.sign_localine :LspDiagnosticsSignHint {:text "◆"})
;(vim.fn.sign_localine :LspDiagnosticsSignInformation {:text "◆"})
(utils.highlight :StatusLine {:bg colors.dark1 :fg colors.light0})
(vim.cmd "highlight link Function GruvboxGreen")
(utils.highlight-add :Function {:gui "NONE"}))
(fn setup-telescope-theme []
(local prompt "blacker")
(if
(= prompt "bright")
(let [promptbg "#689d6a"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.bg_main})
(utils.highlight-add :TelescopePromptTitle {:bg promptbg :fg colors.dark1}))
(= prompt "dark")
(let [promptbg "#252525"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_blue :fg colors.dark1}))
(= prompt "black")
(let [promptbg "#212526"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_green :fg colors.dark1}))
(= prompt "blacker")
(let [promptbg "#1f2324"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_blue :fg colors.dark1})))
(local side "darker")
(if
(= side "brighter")
(let [previewbg "#1f2324"]
(utils.highlight-add :TelescopePreviewNormal {:bg previewbg})
(utils.highlight-add :TelescopePreviewBorder {:bg previewbg :fg previewbg}))
(= side "darker")
(let [previewbg "#1a1e1f"]
(utils.highlight-add :TelescopePreviewNormal {:bg previewbg})
(utils.highlight-add :TelescopePreviewBorder {:bg previewbg :fg previewbg})))
(utils.highlight-add :TelescopeBorder {:bg colors.bg_second :fg colors.bg_second}) (utils.highlight-add :TelescopeNormal {:bg colors.bg_second})
(utils.highlight-add :TelescopePreviewTitle {:bg colors.neutral_green :fg colors.dark1})
(utils.highlight-add :TelescopeResultsTitle {:bg colors.neutral_aqua :fg colors.dark1})
(utils.highlight-add :TelescopeSelection {:bg colors.neutral_aqua :fg colors.dark1}))
(fn setup-noice-theme []
(utils.highlight-add :NoicePopupmenu {:bg colors.bg_second})
(utils.highlight-add :NoiceCmdline {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePopup {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePrompt {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePopupBorder {:fg colors.bright_aqua})
(utils.highlight-add :NoiceCmdlineIcon {:fg colors.bright_aqua}))
(vim.api.nvim_create_autocmd "ColorScheme" {:pattern "*" :callback setup-colors})
(setup-colors)
(vim.api.nvim_create_autocmd "ColorScheme" {:pattern "*" :callback setup-telescope-theme})
(setup-telescope-theme)
(vim.api.nvim_create_autocmd "ColorScheme" {:pattern "*" :callback setup-noice-theme})
(setup-noice-theme)
(vim.api.nvim_create_autocmd
"ColorScheme"
{:pattern "*"
:callback
(fn []
(utils.highlight-add "GitSignsAdd" {:gui "NONE" :bg "NONE" :fg colors.bright_aqua})
(utils.highlight-add "GitSignsDelete" {:gui "NONE" :bg "NONE" :fg colors.neutral_red})
(utils.highlight-add "GitSignsChange" {:gui "NONE" :bg "NONE" :fg colors.bright_blue})
(utils.highlight-add "ScrollbarGitAdd" {:gui "NONE" :bg "NONE" :fg colors.bright_aqua})
(utils.highlight-add "ScrollbarGitDelete" {:gui "NONE" :bg "NONE" :fg colors.neutral_red})
(utils.highlight-add "ScrollbarGitChange" {:gui "NONE" :bg "NONE" :fg colors.bright_blue}))})
(if (= "epix" (vim.fn.hostname))
(vim.cmd "colorscheme gruvbox8_hard")
(vim.cmd "colorscheme gruvbox8")))
[(utils.plugin :lifepillar/vim-gruvbox8 {:lazy false :priority 1000 :config setup})]

View file

@ -0,0 +1,263 @@
(local {: autoload : a : utils} (require :dots.prelude))
(local lsp (autoload :lspconfig))
(local lsp-configs (autoload :lspconfig/configs))
(local cmp_nvim_lsp (autoload :cmp_nvim_lsp))
(fn setup []
; TODO check https://github.com/neovim/nvim-lspconfig/blob/master/ADVANCED_README.md for default config for all of them
(tset vim.lsp.handlers :textDocument/publishDiagnostics
(vim.lsp.with vim.lsp.diagnostic.on_publish_diagnostics
{:update_in_insert false
:virtual_text {:prefix "◆"}
:signs false
:severity_sort true}))
(fn on_attach [client bufnr]
(if client.server_capabilities.documentHighlight
(do
(utils.highlight "LspReferenceRead" {:gui "underline"})
(utils.highlight "LspReferenceText" {:gui "underline"})
(utils.highlight "LspReferenceWrite" {:gui "underline"})
(vim.api.nvim_exec
"augroup lsp_document_highlight
autocmd! * <buffer>
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END"
false))))
(fn better_root_pattern [patterns except-patterns]
"match path if one of the given patterns is matched, EXCEPT if one of the except-patterns is matched"
(fn [path]
(when (not ((lsp.util.root_pattern except-patterns) path))
((lsp.util.root_pattern patterns) path))))
; advertise snippet support
(local default-capabilities
(let [capabilities (vim.lsp.protocol.make_client_capabilities)]
(set capabilities.textDocument.completion.completionItem.snippetSupport true)
(cmp_nvim_lsp.default_capabilities capabilities)))
(fn init-lsp [lsp-name ?opts]
"initialize a language server with defaults"
(let [merged-opts (a.merge {:on_attach on_attach :capabilities default-capabilities} (or ?opts {}))]
((. lsp lsp-name :setup) merged-opts)))
(init-lsp :jsonls {:commands {:Format [ #(vim.lsp.buf.range_formatting [] [0 0] [(vim.fn.line "$") 0])]}})
(init-lsp :denols {:root_dir (better_root_pattern [".git"] ["package.json"])})
(init-lsp :hls {:settings {:languageServerHaskell {:formattingProvider "stylish-haskell"}}})
(init-lsp :ocamllsp)
(init-lsp :vimls)
(init-lsp :gopls)
(init-lsp :bashls)
(init-lsp :erlangls)
(init-lsp :yamlls)
(init-lsp :html)
(init-lsp :svelte)
(init-lsp :elmls)
(init-lsp :texlab)
(init-lsp :pyright)
;(init-lsp :ltex {:settings {:ltex {:dictionary {:de-DE [":~/.config/ltex-ls/dictionary.txt"]}
;:disabledRules {:de-DE [":~/.config/ltex-ls/disabledRules.txt"]}
;:hiddenFalsePositives {:de-DE [":~/.config/ltex-ls/hiddenFalsePositives.txt"]}
;:additionalRules {:motherTongue "de-DE"}}}})
(init-lsp :vls)
;(init-lsp :clangd)
;(init-lsp :ccls)
(init-lsp :perlls)
(init-lsp :powershell_es {:bundle_path "/home/leon/powershell"})
;(ltex-ls.init)
(init-lsp :clangd)
(init-lsp :cssls {:filestypes ["css" "scss" "less" "stylus"]
:root_dir (lsp.util.root_pattern ["package.json" ".git"])
:settings {:css {:validate true}
:less {:validate true}
:scss {:validate true}}})
(lsp.tsserver.setup {:root_dir (lsp.util.root_pattern "package.json")
:on_attach (fn [client bufnr]
(set client.resolved_capabilities.document_formatting false)
(on_attach client bufnr))})
(let [
rustaceanvim (require "rustaceanvim")
rustaceanvim-config (require "rustaceanvim.config")
extension-path "/home/leon/.vscode/extensions/vadimcn.vscode-lldb-1.6.8/"
codelldb-path (.. extension-path "adapter/codelldb")
liblldb-path (.. extension-path "lldb/lib/liblldb.so")
features nil]
(set vim.g.rustaceanvim {:tools {:inlay_hints {:show_parameter_hints false}
:autoSetHints false}
:dap {:adapter (rustaceanvim-config.get_codelldb_adapter codelldb-path liblldb-path)}
:server {:on_attach on_attach
:capabilities default-capabilities
:settings {:rust-analyzer {:cargo {:loadOutDirsFromCheck true
:features (or features "all")
:noDefaultFeatures (~= nil features)}
:procMacro {:enable true}
:diagnostics {:enable false ;; native rust analyzer diagnostics
:experimental {:enable false}}
:checkOnSave {:overrideCommand ["cargo" "clippy" "--workspace" "--message-format=json" "--all-targets" "--all-features"]}}}}}))
;:cmd ["/home/leon/coding/prs/rust-analyzer/target/release/rust-analyzer"]}}))
(when (or true (not lsp.fennel_language_server))
(tset lsp-configs :fennel_language_server
{:default_config {:cmd "/Users/leon/.cargo/bin/fennel-language-server"
:filetypes [:fennel]
:single_file_support true
:root_dir (lsp.util.root_pattern ["fnl" "init.lua"])
:settings {:fennel {:workspace {:library (vim.api.nvim_list_runtime_paths)}
:diagnostics {:globals [:vim]}}}}}))
(init-lsp :fennel_language_server
{:root_dir (lsp.util.root_pattern ["fnl" "init.lua"])
:settings {:fennel {:workspace {:library (vim.api.nvim_list_runtime_paths)}
:diagnostics {:globals [:vim :comment]}}}})
;
;
; (let [sumneko_root_path (.. vim.env.HOME "/.local/share/lua-language-server")
; sumneko_binary (.. sumneko_root_path "/bin/Linux/lua-language-server"))
; (init-lsp
; :lua_ls
; {:cmd [sumneko_binary "-E" (.. sumneko_root_path "/main.lua")]
; :settings {:Lua {:runtime {:version "LuaJIT"
; :path (vim.split package.path ";")}
; :diagnostics {:globals ["vim"]}
; :workspace {:library {(vim.fn.expand "$VIMRUNTIME/lua") true
; (vim.fn.expand "$VIMRUNTIME/lua/vim/lsp") true}}
; :telemetry false}}}))
(comment
(when (not lsp.prolog_lsp)
(tset lsp-configs :prolog_lsp
{:default_config {:cmd ["swipl" "-g" "use_module(library(lsp_server))." "-g" "lsp_server:main" "-t" "halt" "--" "stdio"]
:filetypes ["prolog"]
:root_dir (fn [fname] (or (lsp.util.find_git_ancestor fname) (vim.loop.os_homedir)))
:settings {}}}))
(lsp.prolog_lsp.setup {}))
(comment
(let [ewwls-path "/home/leon/coding/projects/ls-eww/crates/ewwls/target/debug/ewwls"]
(when (vim.fn.filereadable ewwls-path)
(when (not lsp.ewwls)
(set lsp-configs.ewwls
{:default_config {:cmd [ewwls-path]
:filetypes ["yuck"]
:root_dir (fn [fname] (or (lsp.util.find_git_ancestor fname) (vim.loop.os_homedir)))
:settings {}}}))
(init-lsp :ewwls))))
; Idris2 ----------------------------------------------------------- <<<<<
(local autostart-semantic-highlighting true)
(fn refresh-semantic-highlighting []
(when autostart-semantic-highlighting
(vim.lsp.buf_request 0
:textDocument/semanticTokens/full
{:textDocument (vim.lsp.util.make_text_document_params)}
nil)
vim.NIL))
(when (not lsp.idris2_lsp)
(set lsp-configs.idris2_lsp
{:default_config
{:cmd [:idris2-lsp]
:filetypes [:idris2]
:on_new_config (fn [new-config new-root-dir]
(set new-config.cmd {1 :idris2-lsp})
(set new-config.capabilities.workspace.semanticTokens {:refreshSupport true}))
:root_dir (fn [fname]
(local scandir (require :plenary.scandir))
(fn find-ipkg-ancestor [fname]
(lsp.util.search_ancestors
fname
(fn [path]
(local res (scandir.scan_dir path {:depth 1 :search_pattern ".+%.ipkg"}))
(when (not (vim.tbl_isempty res)) path))))
(or (or (find-ipkg-ancestor fname)
(lsp.util.find_git_ancestor fname))
(vim.loop.os_homedir)))
:settings {}}}))
(lsp.idris2_lsp.setup
{:on_attach refresh-semantic-highlighting
:autostart true
:handlers {:workspace/semanticTokens/refresh refresh-semantic-highlighting
:textDocument/semanticTokens/full
(fn [err method result client-id bufnr config]
(let [client (vim.lsp.get_client_by_id client-id)
legend client.server_capabilities.semanticTokensProvider.legend
token-types legend.tokenTypes
data result.data
ns (vim.api.nvim_create_namespace :nvim-lsp-semantic)]
(vim.api.nvim_buf_clear_namespace bufnr ns 0 (- 1))
(local tokens {})
(var (prev-line prev-start) (values nil 0))
(for [i 1 (length data) 5]
(local delta-line (. data i))
(set prev-line
(or (and prev-line (+ prev-line delta-line))
delta-line))
(local delta-start (. data (+ i 1)))
(set prev-start (or (and (= delta-line 0) (+ prev-start delta-start))
delta-start))
(local token-type (. token-types (+ (. data (+ i 3)) 1)))
(vim.api.nvim_buf_add_highlight bufnr
ns
(.. :LspSemantic_ token-type)
prev-line
prev-start
(+ prev-start (. data (+ i 2)))))))}})
(vim.cmd "highlight link LspSemantic_type Include")
(vim.cmd "highlight link LspSemantic_function Identifier")
(vim.cmd "highlight link LspSemantic_struct Number")
(vim.cmd "highlight LspSemantic_variable guifg=gray")
(vim.cmd "highlight link LspSemantic_keyword Structure")
; --------------------------------- >>>>>
(set vim.opt.signcolumn "yes")
; Cleanup links in markdown documentation
(fn cleanup-markdown [contents]
(if (= contents.kind "markdown")
(tset contents :value (string.gsub contents.value "%[([^%]]+)%]%(([^%)]+)%)" "[%1]")))
contents)
(let [previous-handler (. vim.lsp.handlers :textDocument/hover)]
(tset vim.lsp.handlers :textDocument/hover
(fn [a result b c]
(if (not (and result result.contents))
(previous-handler a result b c)
(let [new-contents (cleanup-markdown result.contents)]
(tset result :contents new-contents)
(previous-handler a result b c)))))))
[(utils.plugin :williamboman/mason.nvim {:config #((. (require :mason) :setup))})
(utils.plugin :williamboman/mason-lspconfig.nvim {:config {:ensure_installed ["rust_analyzer"]}})
(utils.plugin :neovim/nvim-lspconfig {:event "VeryLazy" :lazy true :config setup})]
; vim:foldmarker=<<<<<,>>>>>

View file

@ -0,0 +1,152 @@
(local {: autoload : utils} (require :dots.prelude))
(local lsp (autoload :lspconfig))
(local configs (autoload :lspconfig/configs))
(local lsputil (autoload :lspconfig/util))
(fn cmds [xs]
(icollect [_ x (ipairs xs)]
(.. "\\" x "{}")))
(local latex-command-settings
{:dummy (cmds ["texttt" "scripture" "lstref" "figref" "tblref" "secref" "personaltextcite" "personalparencite" "textcite" "parencite" "parencite[]" "game" "acsu" "enquote" "name" "item" "reqref" "gamebtn" "fs" "cs" "appref" "sorty"])
:ignore (cmds ["urlfootnote" "caption" "todo"])})
(local Dictionary-file {:de-DE [(.. (vim.fn.getenv "HOME") "/.config/ltex-ls/dictionary.txt")]})
(local Disabled-rules-file {:de-DE [(.. (vim.fn.getenv "HOME") "/.config/ltex-ls/disable.txt")]})
(local False-positives-file {:de-DE [(.. (vim.fn.getenv "HOME") "/.config/ltex-ls/false.txt")]})
(local latex-command-settings-formatted
(let [tbl {}]
(each [option commands (pairs latex-command-settings)]
(each [_ command (ipairs commands)]
(tset tbl command option)))
tbl))
(fn read-files [files]
(let [dict {}]
(each [_ file (ipairs files)]
(local f (io.open file :r))
(when (~= nil f)
(each [l (f:lines)]
(table.insert dict l))))
dict))
(fn find-ltex-lang []
(let [buf-clients (vim.lsp.buf_get_clients)]
(each [_ client (ipairs buf-clients)]
(when (= client.name :ltex)
(let [___antifnl_rtn_1___ client.config.settings.ltex.language]
(lua "return ___antifnl_rtn_1___"))))))
(fn find-ltex-files [filetype value]
(if (= filetype :dictionary)
(. Dictionary-file (or value (find-ltex-lang)))
(= filetype :disable)
(. Disabled-rules-file (or value (find-ltex-lang)))
(= filetype :falsePositive)
(. False-positives-file (or value (find-ltex-lang)))))
(fn update-config [lang configtype]
(let [buf-clients (vim.lsp.buf_get_clients)]
(var client nil)
(each [_ lsp (ipairs buf-clients)]
(when (= lsp.name :ltex)
(set client lsp)))
(if client
(if (= configtype :dictionary)
(if client.config.settings.ltex.dictionary
(do
(set client.config.settings.ltex.dictionary
{lang (read-files (. Dictionary-file lang))})
(client.notify :workspace/didChangeConfiguration
client.config.settings))
(vim.notify "Error when reading dictionary config, check it"))
(= configtype :disable)
(if client.config.settings.ltex.disabledRules
(do
(set client.config.settings.ltex.disabledRules
{lang (read-files (. Disabled-rules-file lang))})
(client.notify :workspace/didChangeConfiguration
client.config.settings))
(vim.notify "Error when reading disabledRules config, check it"))
(= configtype :falsePositive)
(if client.config.settings.ltex.hiddenFalsePositives
(do
(set client.config.settings.ltex.hiddenFalsePositives
{lang (read-files (. False-positives-file lang))})
(client.notify :workspace/didChangeConfiguration
client.config.settings))
(vim.notify "Error when reading hiddenFalsePositives config, check it")))
nil)))
(fn add-to-file [filetype lang file value]
(set-forcibly! file (io.open (. file (- (length file) 0)) :a+))
(if file (do
(file:write (.. value "\n"))
(file:close))
(let [___antifnl_rtns_1___ [(print "Failed insert %q" value)]]
(lua "return (table.unpack or _G.unpack)(___antifnl_rtns_1___)")))
(if (= filetype :dictionary) (update-config lang :dictionary)
(= filetype :disable) (update-config lang :disable)
(= filetype :falsePositive) (update-config lang :falsePositive)))
(fn add-to [filetype lang file value]
(let [dict (read-files file)]
(each [_ v (ipairs dict)]
(when (= v value)
(lua "return nil")))
(add-to-file filetype lang file value)))
(fn init []
(set configs.ltex
{:default_config {:cmd [:ltex-ls]
:filetypes [:tex :latex :bib]
:root_dir (fn [filename] (lsputil.path.dirname filename))}})
(lsp.ltex.setup {:settings {:ltex {:enabled [:latex :tex :bib]
:language "de-DE"
:checkFrequency "save"
:diagnosticSeverity "information"
:setenceCacheSize 5000
:additionalRules {:enablePickyRules true
:motherTongue "de-DE"}
:dictionary (utils.map-values read-files Dictionary-file)
:disabledRules (utils.map-values read-files Disabled-rules-file)
:hiddenFalsePositives (utils.map-values read-files False-positives-file)
:latex {:commands latex-command-settings-formatted}}}})
(set lsp.ltex.dictionary_file Dictionary-file)
(set lsp.ltex.disabledrules_file Disabled-rules-file)
(set lsp.ltex.falsepostivies_file False-positives-file)
(local orig-execute-command vim.lsp.buf.execute_command)
(set vim.lsp.buf.execute_command
(fn [command]
(if (= command.command :_ltex.addToDictionary)
(let [arg (. (. command.arguments 1) :words)]
(each [lang words (pairs arg)]
(each [_ word (ipairs words)]
(local filetype :dictionary)
(add-to filetype lang (find-ltex-files filetype lang) word))))
(= command.command :_ltex.disableRules)
(let [arg (. (. command.arguments 1) :ruleIds)]
(each [lang rules (pairs arg)]
(each [_ rule (ipairs rules)]
(local filetype :disable)
(add-to filetype lang (find-ltex-files filetype lang) rule))))
(= command.command :_ltex.hideFalsePositives)
(let [arg (. (. command.arguments 1) :falsePositives)]
(each [lang rules (pairs arg)]
(each [_ rule (ipairs rules)]
(local filetype :falsePositive)
(add-to filetype lang (find-ltex-files filetype lang) rule))))
(orig-execute-command command)))))
[]

View file

@ -0,0 +1,35 @@
(local utils (require :dots.utils))
[(utils.plugin
:folke/noice.nvim
{:dependencies [:MunifTanjim/nui.nvim]
:opts {:presets {:inc_rename true
:long_message_to_split true
:bottom_search true}
;:command_palette true}
:lsp {:override {:vim.lsp.util.convert_input_to_markdown_lines true
:vim.lsp.util.stylize_markdown true
:cmp.entry.get_documentation true}}
:views {:cmdline_popup {:border {:style "none" :padding [1 1]}
:position {:row 5 :col "50%"}
:size {:width 60 :height "auto"}}
:popupmenu {:relative "editor"
:border {:style "none" :padding [1 1]}
:position {:row 8 :col "50%"}
:size {:width 60 :height 10}}
:mini {:max_height 5}}
:cmdline {:view "cmdline" ; change to cmdline_popup
:format {:cmdline {:icon ":"}
:lua false
:help false}}
:messages {:view "mini"
:view_error "cmdline_output"
:view_warn "mini"
:view_search "virtualtext"}
:markdown {:hover {"|(%S-)|" vim.cmd.help}}
:routes [{:view "notify" :filter {:event "msg_showmode"}}
{:view "mini"
:filter {:error true :max_height 5}}
{:view "cmdline_output"
:filter {:error true :min_height 6}}]}})]
[]

View file

@ -0,0 +1,16 @@
(local {: autoload : utils} (require :dots.prelude))
(local colorizer (autoload :colorizer))
[(utils.plugin
:norcalli/nvim-colorizer.lua
{:event "VeryLazy"
:lazy true
:config #(colorizer.setup
["*"]
{:RGB true
:RRGGBB true
:names true
:RRGGBBAA true
:rgb_fn true
:hsl_fn true
:mode "background"})})]

View file

@ -0,0 +1,15 @@
(local {: autoload : utils} (require :dots.prelude))
(local vault-path (.. (vim.fn.expand "~") "/Documents/obsidian-vault"))
[(utils.plugin :epwalsh/obsidian.nvim
{:lazy true
:version "*"
:ft "markdown"
:event [(.. "BufReadPre " vault-path "/**.md")
(.. "BufNewFile " vault-path "/**.md")]
:dependencies ["nvim-lua/plenary.nvim"]
:opts {:workspaces [{:name "Vault"
:path vault-path}]
:completion {:nvim_cmp true}}})]

View file

@ -0,0 +1,180 @@
;(local {: autolod} (require :nfnl.module))
(macro setup [name opts]
`((. (require ,name) :setup) ,opts))
(macro plugin [name ?opts]
(if (= nil ?opts)
name
(do (tset ?opts 1 name) ?opts)))
[(plugin :Olical/aniseed)
(plugin :Olical/nfnl)
(plugin :nvim-lua/plenary.nvim)
(plugin :norcalli/nvim.lua)
(plugin :kyazdani42/nvim-web-devicons)
(plugin :folke/which-key.nvim)
(plugin :ckipp01/nvim-jenkinsfile-linter
{:dependencies ["nvim-lua/plenary.nvim"]})
(plugin :psliwka/vim-smoothie)
(plugin :nathanaelkane/vim-indent-guides
{:cmd ["IndentGuidesToggle"]})
(plugin :luukvbaal/stabilize.nvim {:config true})
(plugin :stevearc/dressing.nvim {:config true})
(plugin :tweekmonster/startuptime.vim {:cmd ["StartupTime"]})
(plugin :moll/vim-bbye {:lazy true :cmd [:Bdelete :Bwipeout]})
(plugin :petertriho/nvim-scrollbar
{:event "VeryLazy"
:lazy true
:config true})
(plugin :TimUntersberger/neogit
{:opts {:integrations {:diffview true}}
:cmd ["Neogit"]})
(plugin :folke/persistence.nvim
{:opts {:dir (vim.fn.expand (.. (vim.fn.stdpath "cache") "/sessions/"))}})
(plugin "https://git.sr.ht/~whynothugo/lsp_lines.nvim"
{:config #(do (setup :lsp_lines)
(vim.diagnostic.config {:virtual_lines false}))})
; editing and movement <<<
(plugin :jiangmiao/auto-pairs)
(plugin :tpope/vim-repeat)
(plugin :preservim/nerdcommenter
{:event "VeryLazy"
:lazy true
:priority 1000})
(plugin :godlygeek/tabular
{:cmd ["Tabularize"]})
(plugin :tpope/vim-surround)
(plugin :hauleth/sad.vim)
(plugin :wellle/targets.vim) ; more text objects. IE: cin (change in next parens). generally better handling of surrounding objects.
(plugin :mg979/vim-visual-multi
{:lazy true :event "VeryLazy"})
(plugin :tommcdo/vim-exchange)
(plugin :phaazon/hop.nvim
{:lazy true
:event "VeryLazy"
:opts {:keys "jfkdls;amvieurow"}})
; >>>
; debugger <<<
(plugin :rcarriga/nvim-dap-ui
{:lazy true
:config true
:dependencies [:mfussenegger/nvim-dap
:nvim-neotest/nvim-nio]})
(plugin :mfussenegger/nvim-dap
{:lazy true})
(plugin :nvim-telescope/telescope-dap.nvim
{:lazy true
:dependencies [:nvim-telescope/telescope.nvim
:mfussenegger/nvim-dap]})
; >>>
; git stuff <<<
(plugin :ldelossa/gh.nvim
{:lazy true
:config #(do ((. (require "litee.lib") :setup))
((. (require "litee.gh") :setup)))
:dependencies [:ldelossa/litee.nvim]})
(plugin :pwntester/octo.nvim
{:lazy true
:dependencies [:nvim-lua/plenary.nvim
:nvim-telescope/telescope.nvim
:kyazdani42/nvim-web-devicons]
:config true})
(plugin :ruanyl/vim-gh-line)
(plugin :rhysd/conflict-marker.vim)
(plugin :tpope/vim-fugitive
{:lazy true :event "VeryLazy"})
; >>>
; lsp <<<
(plugin :ray-x/lsp_signature.nvim
{:event :BufEnter})
(plugin :weilbith/nvim-code-action-menu
{:cmd "CodeActionMenu"
:config #(set vim.g.code_action_menu_show_details false)})
(plugin :dnlhc/glance.nvim
{:lazy true :config true})
(plugin :smjonas/inc-rename.nvim
{:opts {:input_buffer_type "dressing"}})
; >>>
; cmp <<<
; >>>
; code-related ----------------------------------------- <<<
(plugin :monkoose/nvlime
{:ft ["lisp"] :dependencies [:monkoose/parsley]})
(plugin :imsnif/kdl.vim)
(plugin :tpope/vim-sleuth)
(plugin :editorconfig/editorconfig-vim)
(plugin :sbdchd/neoformat)
(plugin :elkowar/antifennel-nvim
{:config #(set vim.g.antifennel_executable "/home/leon/tmp/antifennel/antifennel")})
(plugin :Olical/conjure {:ft ["fennel"]})
(plugin :eraserhd/parinfer-rust {:build "cargo build --release"})
(plugin :kmonad/kmonad-vim)
(plugin :elkowar/yuck.vim {:ft ["yuck"]})
(plugin :cespare/vim-toml {:ft ["toml"]})
(plugin :bduggan/vim-raku {:ft ["raku"]})
(plugin :LnL7/vim-nix {:ft ["nix"]})
(plugin :kevinoid/vim-jsonc {})
(plugin :pangloss/vim-javascript {:ft ["javascript"]}) ; syntax highlighting JS
(plugin :ianks/vim-tsx {:ft ["typescript-react"]})
(plugin :leafgarland/typescript-vim {:ft ["typescript" "typescript-react" "javascript"]})
(plugin :HerringtonDarkholme/yats.vim {}) ; typescript syntax highlighting
(plugin :mxw/vim-jsx {})
(plugin :purescript-contrib/purescript-vim {:ft ["purescript"]})
(plugin :derekelkins/agda-vim {:ft ["agda"]})
(plugin :neovimhaskell/haskell-vim { :ft ["haskell"]})
(plugin :monkoose/nvlime
{:ft ["lisp"]
:dependencies ["monkoose/parsley"]
:config #(set vim.g.vlime_overlay "slimv")})
(plugin :rust-lang/rust.vim
{:ft ["rust"]
:dependencies ["mattn/webapi-vim"]
:config #(do (set vim.g.rustfmt_fail_silently 1))})
(plugin :Saecki/crates.nvim
{:dependencies ["nvim-lua/plenary.nvim"]
;:event ["BufRead Cargo.toml"]
;:lazy true
:opts {;:disable_invalid_feature_diagnostic true
:enable_update_available_warning false}})
; temporarily using this fork that merges a few fixes, until simrat is back
(plugin :mrcjkb/rustaceanvim {:version "^4" :ft ["rust" "toml"]})
;(plugin :MunifTanjim/rust-tools.nvim
;{:ft ["rust" "toml"]
;:dependencies ["nvim-lua/popup.nvim" "nvim-lua/plenary.nvim"]})
;(plugin :simrat39/rust-tools.nvim
;{:ft ["rust" "toml"]
;:dependencies ["nvim-lua/popup.nvim" "nvim-lua/plenary.nvim"]})
(plugin :qnighy/lalrpop.vim {})
(plugin :edwinb/idris2-vim {:ft ["idris2"]})
(plugin :vmchale/ats-vim {:ft ["ats" "dats" "sats"]})
(plugin :bakpakin/fennel.vim {:ft ["fennel"]})
(plugin :evanleck/vim-svelte {})]
; >>>
; vim:foldmarker=<<<,>>>

View file

@ -0,0 +1,20 @@
(local {: autoload : utils} (require :dots.prelude))
(local telescope (autoload :telescope))
(local actions (autoload :telescope.actions))
(fn setup []
(telescope.setup
{:defaults {:mappings {:i {:<esc> actions.close}}
:file_ignore_patterns ["Cargo.lock" ".*.snap" "docs/theme/.*" "node%_modules/.*" "target/.*"]}
:extensions {:ui-select [((. (require "telescope.themes") :get_dropdown))]}})
(telescope.load_extension "dap")
(utils.keymap :n :<C-p> ":Telescope find_files<CR>"))
[(utils.plugin :nvim-telescope/telescope.nvim
{:config setup
:cmd ["Telescope"]
:dependencies [:nvim-lua/popup.nvim
:nvim-lua/plenary.nvim]})]

View file

@ -0,0 +1,12 @@
(local utils (require :dots.utils))
[(utils.plugin
:folke/todo-comments.nvim
{:lazy true
:event "VeryLazy"
:opts {:keywords {:TODO {:icon " "}
:WARN {:icon " " :alt [:WARNING :XXX :!!!]}
:NOTE {:icon " " :alt [:INFO]}
:FIX {:icon " " :alt [:FIXME :BUG :FIXIT :ISSUE :PHIX]}
:PERF {:icon " " :alt [:OPTIM :PERFORMANCE :OPTIMIZE]}
:HACK {:icon " "}}}})]

View file

@ -0,0 +1,64 @@
(local utils (require :dots.utils))
; require('ts_context_commentstring').setup {} and set vim.g.skip_ts_context_commentstring_module = true to speed up loading instead.
(fn setup []
(local configs (require :nvim-treesitter.configs))
(set vim.g.skip_ts_context_commentstring_module true)
(configs.setup
{:ensure_installed ["rust" "fennel" "commonlisp" "vim" "regex" "lua" "bash" "markdown" "markdown_inline"]
; :ensure_installed "maintained"
:highlight {:enable false
:disable ["fennel" "rust" "haskell"]}
:incremental_selection {:enable false
:keymaps {:init_selection "gss"
:node_incremental "gsl"
:node_decremental "gsh"
:scope_incremental "gsj"
:scope_decremental "gsk"}}
:textsubjects {:enable true
:disable ["noice"]
:prev_selection ","
:keymaps {"." "textsubjects-smart"}}
; Might fuck with gitsigns
;:rainbow {:enable true}
;:extended_mode true}
;:context_commentstring {:enable true :disable ["rust" "fennel"]}
:playground
{:enable false
:disable ["fennel"]
:updatetime 25 ; Debounced time for highlighting nodes in the playground from source code
:persist_queries false ; Whether the query persists across vim sessions
:keybindings
{:toggle_query_editor "o"
:toggle_hl_groups "i"
:toggle_injected_languages "t"
:toggle_anonymous_nodes "a"
:toggle_language_display "I"
:focus_language "f"
:unfocus_language "F"
:update "R"
:goto_node "<cr>"
:show_help "?"}}}))
;[(utils.plugin :nvim-treesitter/nvim-treesitter
;{:config setup
;:lazy true
;:event ["VeryLazy"]
;:build ":TSUpdate"})
;(utils.plugin :RRethy/nvim-treesitter-textsubjects
;{:dependencies [:nvim-treesitter/nvim-treesitter]
;:lazy true
;:event ["VeryLazy"]})
;(utils.plugin :JoosepAlviste/nvim-ts-context-commentstring
;{:event ["VeryLazy"]
;:lazy true
;:dependencies [:nvim-treesitter/nvim-treesitter]})
;(utils.plugin :nvim-treesitter/playground
;{:event ["VeryLazy"]
;:lazy true
;:dependencies [:nvim-treesitter/nvim-treesitter]})]
[]

View file

@ -0,0 +1,38 @@
(local {: autoload : utils : colors} (require :dots.prelude))
(local trouble (autoload :trouble))
(fn setup []
(trouble.setup
{:icons false
; disabled due to https://github.com/folke/trouble.nvim/issues/125
:auto_preview false
:auto_close true
:auto_open false
:auto_jump ["lsp_definitions" "lsp_workspace_diagnostics" "lsp_type_definitions"]
:indent_lines false
:multiline false
:action_keys
{:jump "<CR>"
:jump_close "o"
:close ["<esc>" "q"]
:cancel "q"
:preview "p"
:toggle_preview "P"
:toggle_mode "m"
:hover ["a" "K"]}})
(utils.highlight "TroubleFoldIcon" {:bg "NONE" :fg colors.bright_orange})
(utils.highlight "TroubleCount" {:bg "NONE" :fg colors.bright_green})
(utils.highlight "TroubleText" {:bg "NONE" :fg colors.light0})
(utils.highlight "TroubleSignError" {:bg "NONE" :fg colors.bright_red})
(utils.highlight "TroubleSignWarning" {:bg "NONE" :fg colors.bright_yellow})
(utils.highlight "TroubleSignInformation" {:bg "NONE" :fg colors.bright_aqua})
(utils.highlight "TroubleSignHint" {:bg "NONE" :fg colors.bright_blue}))
[(utils.plugin
:folke/trouble.nvim
{:lazy true
:config setup
:cmd ["Trouble" "TroubleClose" "TroubleRefresh" "TroubleToggle"]})]

View file

@ -0,0 +1,42 @@
(local utils (require :dots.utils))
(fn setup []
(set vim.g.vimtex_view_method "general")
(set vim.g.vimtex_view_general_viewer "zathura")
(set vim.g.vimtex_view_general_options "--synctex-forward @line:1:@tex @pdf")
;(set vim.g.vimtex_view_general_options "--unique file:@pdf#src:@line@tex")
(set vim.g.vimtex_quickfix_method "pplatex")
(set vim.g.vimtex_quickfix_mode 2)
(set vim.g.vimtex_quickfix_open_on_warning 0)
(set vim.g.vimtex_compiler_latexmk {:build_dir ""
:callback 1
:continuous 1
:executable "latexmk"
:hooks []
:options ["-verbose"
"-file-line-error"
"-synctex=1"
"-interaction=nonstopmode"
"-shell-escape"]})
(set vim.g.vimtex_syntax_custom_cmds
[{:name "scripture" :argstyle "ital"}])
(set vim.g.vimtex_syntax_conceal {:accents 1
:cites 1
:fancy 1
:greek 1
:math_bounds 1
:math_delimiters 1
:math_fracs 1
:math_super_sub 1
:math_symbols 1
:sections 0
:styles 0}))
[(utils.plugin
:lervag/vimtex
{:ft ["latex" "tex"]
:config setup})]

View file

@ -0,0 +1,6 @@
(local {: autoload} (require :nfnl.module))
{: autoload
:a (autoload :nfnl.core)
:str (autoload :nfnl.string)
:utils (autoload :dots.utils)
:colors (autoload :dots.colors)}

View file

@ -0,0 +1,160 @@
(local {: autoload : a : str} (require :dots.prelude))
(fn plugin [name ?opts]
(if (= nil ?opts)
name
(do
(tset ?opts 1 name)
?opts)))
(fn prepend [a list]
(local x list)
(table.insert x 1 a)
x)
(fn all [f]
(not (a.some #(not (f $1)))))
(fn single-to-list [x]
"Returns the list given to it. If given a single value, wraps it in a list"
(if (a.table? x) x [x]))
(fn contains? [list elem]
(or (a.some #(= elem $1) list)) false)
(fn filter-table [f t]
(collect [k v (pairs t)]
(when (f k v)
(values k v))))
(fn split-last [s sep]
"split a string at the last occurrence of a separator"
(for [i (length s) 1 -1]
(let [c (s:sub i i)]
(when (= sep c)
(let [left (s:sub 1 (- i 1))
right (s:sub (+ i 1))]
(lua "return { left, right }")))))
[s])
(fn find-where [pred xs]
(each [_ x (ipairs xs)]
(when (pred x)
(lua "return x"))))
(fn find-map [f xs]
(each [_ x (ipairs xs)]
(let [res (f x)]
(when (~= nil res)
(lua "return res")))))
(fn keep-if [f x]
(when (f x) x))
(fn map-values [f t]
"Map over the values of a table, keeping the keys intact"
(let [tbl {}]
(each [k v (pairs t)] (tset tbl k (f v)))
tbl))
(fn without-keys [keys t]
(filter-table #(not (contains? keys $1)) t))
(fn keymap [modes from to ?opts]
"Set a mapping in the given modes, and some optional parameters, defaulting to {:noremap true :silent true}.
If :buffer is set, uses buf_set_keymap rather than set_keymap"
(let [full-opts (->> (or ?opts {})
(a.merge {:noremap true :silent true})
(without-keys [:buffer]))]
(each [_ mode (ipairs (single-to-list modes))]
(let [keymap-opts (if (-?> ?opts (. :buffer)) (a.assoc full-opts :buffer 0) full-opts)]
(vim.keymap.set mode from to keymap-opts)))))
(fn del-keymap [mode from ?buf-local]
"Remove a keymap. Arguments: mode, mapping, bool if mapping should be buffer-local."
(vim.keymap.del mode from
(if ?buf-local {:buffer 0} {})))
(fn buffer-content [bufnr]
"Returns a table of lines in the given buffer"
(vim.api.nvim_buf_get_lines bufnr 0 -1 false))
(fn surround-if-present [a mid b]
(if mid
(.. a mid b)
""))
(fn highlight [group-arg colset]
(let [default { :fg "NONE" :bg "NONE" :gui "NONE"}
opts (a.merge default colset)]
(each [_ group (ipairs (single-to-list group-arg))]
(vim.cmd (.. "hi! " group " guifg='" opts.fg "' guibg='" opts.bg "' gui='" opts.gui "'")))))
(fn highlight-add [group-arg colset]
(each [_ group (ipairs (single-to-list group-arg))]
(vim.cmd
(.. "hi! "
group
(surround-if-present " guibg='" colset.bg "'")
(surround-if-present " guifg='" colset.fg "'")
(surround-if-present " gui='" colset.gui "'")))))
(fn shorten-path [path seg-length shorten-after]
"shorten a filepath by truncating the segments to n characters, if the path exceeds a given length"
(let [segments (str.split path "/")]
(if (or (> shorten-after (length path))
(> 2 (length segments)))
path
(let [init (a.butlast segments)
filename (a.last segments)
shortened-segs (a.map #(string.sub $1 1 seg-length) init)]
(.. (str.join "/" shortened-segs) "/" filename)))))
(fn comp [f g]
(fn [...]
(f (g ...))))
(fn get-selection []
(let [[_ s-start-line s-start-col] (vim.fn.getpos "'<")
[_ s-end-line s-end-col] (vim.fn.getpos "'>")
n-lines (+ 1 (math.abs (- s-end-line s-start-line)))
lines (vim.api.nvim_buf_get_lines 0 (- s-start-line 1) s-end-line false)]
(if (= nil (. lines 1))
(values s-start-line s-end-line lines)
(do
(tset lines 1 (string.sub (. lines 1) s-start-col -1))
(if (= 1 n-lines)
(tset lines n-lines (string.sub (. lines n-lines) 1 (+ 1 (- s-end-col s-start-col))))
(tset lines n-lines (string.sub (. lines n-lines) 1 s-end-col)))
(values s-start-line s-end-line lines)))))
{: plugin
: all
: single-to-list
: contains?
: filter-table
: split-last
: find-where
: find-map
: keep-if
: map-values
: without-keys
: keymap
: del-keymap
: buffer-content
: surround-if-present
: highlight
: highlight-add
: shorten-path
: prepend
: comp
: get-selection}

View file

@ -0,0 +1,41 @@
;; [nfnl-macro]
{:augroup
(fn [name ...]
`(do
(nvim.ex.augroup ,(tostring name))
(nvim.ex.autocmd_)
,...
(nvim.ex.augroup :END)))
:al
(fn [name thing]
`(local ,name ((. (require :nfnl.module) :autoload) ,(tostring thing))))
:autocmd
(fn [...]
`(nvim.ex.autocmd ,...))
:_:
(fn [name ...]
`((. nvim.ex ,(tostring name)) ,...))
:viml->fn
(fn [name]
`(.. "lua require('" *module-name* "')['" ,(tostring name) "']()"))
:each-pair
(fn [args ...]
(let [[l# r# d#] args]
`(let [a# (require "nfnl.core")
data# ,d#]
(for [i# 1 (a#.count data#) 2]
(let [,l# (. data# i#)
,r# (. data# (+ i# 1))]
,...)))))}

View file

@ -0,0 +1,144 @@
(local {: autoload} (require :nfnl.module))
(local a (autoload :nfnl.core))
(local str (autoload :nfnl.string))
(local utils (autoload :dots.utils))
(local lazy (require :lazy))
(when (vim.fn.has "termguicolors")
(set vim.opt.termguicolors true))
(vim.cmd "let mapleader=\"\\<Space>\"")
(vim.cmd "let maplocalleader=\",\"")
(lazy.setup {:import "dots.plugins" :install {:colorscheme "gruvbox8"}})
; (require "impatient")
(require "dots.keybinds")
; add to runtimepath
(let [added-paths []]
(set vim.opt.runtimepath (.. vim.o.runtimepath (str.join "," added-paths))))
; Basic setup --------------------------------------- foldstart
(vim.cmd "filetype plugin indent on")
(vim.cmd "syntax on")
(set vim.opt.foldmethod "marker")
(set vim.opt.scrolloff 5)
(set vim.opt.showmode false)
(set vim.opt.undodir (.. vim.env.HOME "/.vim/undo-dir"))
(set vim.opt.undofile true)
(set vim.opt.shortmess (.. vim.o.shortmess "c")) ; Don't give completion messages like 'match 1 of 2' or 'The only match'
(set vim.opt.hidden true)
(set vim.opt.encoding "utf-8")
(set vim.opt.number false)
(set vim.opt.relativenumber false)
(set vim.opt.compatible false)
(set vim.opt.cursorline true)
(set vim.opt.incsearch true)
(set vim.opt.hlsearch true)
(set vim.opt.inccommand "nosplit")
(set vim.opt.signcolumn "yes")
(set vim.opt.shiftwidth 2)
(set vim.opt.tabstop 2)
(set vim.opt.backspace "indent,eol,start")
(set vim.opt.autoindent true)
(set vim.opt.smartindent true)
(set vim.opt.expandtab true)
(set vim.opt.wrap false)
(set vim.opt.completeopt "menuone,noselect")
(set vim.opt.laststatus 2)
(set vim.opt.splitbelow true)
(set vim.opt.splitright true)
(set vim.opt.mouse "a")
(set vim.opt.shell "bash")
(set vim.opt.background "dark")
(set vim.opt.swapfile false)
(set vim.opt.undolevels 10000)
(set vim.opt.keywordprg "rusty-man")
(set vim.g.AutoPairsMultilineClose 0)
(vim.cmd "let &t_ut=\"\"")
(set vim.opt.title true)
(set vim.opt.titlelen 0)
(set vim.opt.titlestring "%{expand(\"%:p\")} [%{mode()}]")
(vim.api.nvim_create_autocmd "BufWritePost" {:pattern "*.hs" :callback #(set vim.opt.shiftwidth 2)})
(vim.api.nvim_create_autocmd "FileType" {:pattern "vim" :callback #(set vim.opt_local.foldmethod "marker")})
;Disables automatic commenting on newline)
(vim.api.nvim_create_autocmd "FileType"
{:pattern "*"
:callback #(set vim.opt_local.formatoptions (vim.o.formatoptions:gsub "[cor]" ""))})
; Auto-close quickfix list when element is selected)
(vim.api.nvim_create_autocmd "FileType"
{:pattern "qf"
:callback #(vim.cmd "nnoremap <buffer> <CR> <CR>:cclose<CR>")})
(vim.api.nvim_create_autocmd "TextYankPost"
{:pattern "*"
:callback #(vim.highlight.on_yank {:higroup "IncSearch" :timeout 300})})
(set vim.g.copilot_filetypes {:TelescopePrompt false})
; foldend
; Colors ------------------------------------------------------- foldstart
; foldend
(vim.diagnostic.config
{:float {:border "single"
:style "minimal"}})
; Plugin config ----------------------- foldstart
(set vim.g.VM_leader "m") ; visual-multi leader
; rust.vim
(set vim.g.rust_clip_command "xclip -selection clipboard")
;(set vim.g.rustfmt_autosave 1)
(set vim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
(set vim.g.vim_parinfer_filetypes ["carp" "fennel" "clojure"])
(set vim.g.parinfer_additional_filetypes ["yuck"])
; foldend
; :: autoclose empty unnamed buffers ----------------------------------------------- foldstart
(fn _G.clean_no_name_empty_buffers []
(let [bufs (a.filter #(and (a.empty? (vim.fn.bufname $1))
(< (vim.fn.bufwinnr $1) 0)
(vim.api.nvim_buf_is_loaded $1)
(= "" (str.join (utils.buffer-content $1)))
(vim.api.nvim_buf_get_option $1 "buflisted"))
(vim.fn.range 1 (vim.fn.bufnr "$")))]
(when (not (a.empty? bufs))
(vim.cmd (.. "bdelete " (str.join " " bufs))))))
(vim.cmd "autocmd! BufCreate * :call v:lua.clean_no_name_empty_buffers()")
; foldend
(vim.cmd
"command! -nargs=1 L :lua print(vim.inspect(<args>))")
; vim:foldmarker=foldstart,foldend

View file

@ -0,0 +1,52 @@
-- not even used, but epic. stores the path to the root config directory.
local vim_config_root = vim.fn.expand("<sfile>:p:h")
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
function ensure(user, repo, branch, commit)
-- Ensures a given github.com/USER/REPO is cloned in the lazy/packer/start directory.
local install_path = vim.fn.stdpath("data") .. "/lazy/" .. repo
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.system({"git", "clone", "--depth", "1", "--branch", branch, "https://github.com/" .. user .. "/" .. repo, install_path})
if commit ~= nil then
vim.fn.system({"git", "--git-dir", install_path .. "/.git", "reset", "--hard", commit})
end
end
vim.opt.rtp:prepend(install_path)
end
-- Bootstrap essential plugins required for installing and loading the rest.
--ensure("wbthomason", "packer.nvim", "master")
--ensure("Olical", "aniseed", "master")
ensure("Olical", "nfnl", "v1.0.0")
require('nfnl')['setup']()
--require('nfnl.api')['compile-all-files']()
require("main")
-- ensure("lewis6991", "impatient.nvim", "main")
-- require("impatient")
-- vim.g["aniseed#env"] = {
-- compile = true
-- }
--require("aniseed.env").init({compile = true})
-- vim.cmd ("source "..vim_config_root.."/amulet.vim")

View file

@ -0,0 +1,107 @@
{
"agda-vim": { "branch": "master", "commit": "4a0f475aaef756702222bdd5b01e25f814f5691f" },
"aniseed": { "branch": "master", "commit": "d558a68329c465bced901adf3238a6f946d62483" },
"antifennel-nvim": { "branch": "master", "commit": "79261d02213a5093135e5d02431682f04459f0f7" },
"ats-vim": { "branch": "master", "commit": "8e3e722b6d09ed81313573b4e7b108b265628ff1" },
"auto-pairs": { "branch": "master", "commit": "39f06b873a8449af8ff6a3eee716d3da14d63a76" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" },
"cmp-conventionalcommits": { "branch": "master", "commit": "a4dfacf0601130b7f8afa7c948d735c27802fb7f" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-omni": { "branch": "main", "commit": "4ef610bbd85a5ee4e97e09450c0daecbdc60de86" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
"conflict-marker.vim": { "branch": "master", "commit": "62742b2ffe7a433988759c67b5c5a22eff74a14b" },
"conjure": { "branch": "master", "commit": "6d2bc7f7b24c2c43d54f263bee7b9b08aef5d1a1" },
"copilot.lua": { "branch": "master", "commit": "86537b286f18783f8b67bccd78a4ef4345679625" },
"crates.nvim": { "branch": "main", "commit": "891063a2dc8471501b9742406a514be62a20c138" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "c5775a888adbc50652cb370073fcfec963eca93e" },
"editorconfig-vim": { "branch": "master", "commit": "8b7da79e9daee7a3f3a8d4fe29886b9756305aff" },
"emmet-vim": { "branch": "master", "commit": "6c511a8d7d2863066f32e25543e2bb99d505172c" },
"feline.nvim": { "branch": "master", "commit": "3587f57480b88e8009df7b36dc84e9c7ff8f2c49" },
"fennel.vim": { "branch": "master", "commit": "30b9beabad2c4f09b9b284caf5cd5666b6b4dc89" },
"flutter-tools.nvim": { "branch": "main", "commit": "e6671ce76acf607678cd79b12029371ab67fb6f5" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
"gh.nvim": { "branch": "main", "commit": "ebbaac254ef7dd6f85b439825fbce82d0dc84515" },
"gitsigns.nvim": { "branch": "main", "commit": "562dc47189ad3c8696dbf460d38603a74d544849" },
"glance.nvim": { "branch": "master", "commit": "51059bcf21016387b6233c89eed220cf47fca752" },
"haskell-vim": { "branch": "master", "commit": "f35d02204b4813d1dbe8b0e98cc39701a4b8e15e" },
"hop.nvim": { "branch": "master", "commit": "1a1eceafe54b5081eae4cb91c723abd1d450f34b" },
"idris2-vim": { "branch": "master", "commit": "964cebee493c85f75796e4f4e6bbb4ac54e2da9e" },
"inc-rename.nvim": { "branch": "main", "commit": "8ba77017ca468f3029bf88ef409c2d20476ea66b" },
"kdl.vim": { "branch": "main", "commit": "b84d7d3a15d8d30da016cf9e98e2cfbe35cddee5" },
"kmonad-vim": { "branch": "master", "commit": "37978445197ab00edeb5b731e9ca90c2b141723f" },
"lalrpop.vim": { "branch": "master", "commit": "7073eec8efdeff37cacd4bca378c28dad02c3c14" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"litee.nvim": { "branch": "main", "commit": "4efaf373322d9e71eaff31164abb393417cc6f6a" },
"lsp_lines.nvim": { "branch": "main", "commit": "7d9e2748b61bff6ebba6e30adbc7173ccf21c055" },
"lsp_signature.nvim": { "branch": "master", "commit": "a38da0a61c172bb59e34befc12efe48359884793" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "482350b050bd413931c2cdd4857443c3da7d57cb" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"neoformat": { "branch": "master", "commit": "b3b38589b39038dc12c2f5a59a828ed43439363a" },
"neogit": { "branch": "master", "commit": "6af8fc6b03210d0ac99398f8eff27c5be7b2ba8a" },
"nerdcommenter": { "branch": "master", "commit": "3f860f2d981547c18f2c9599e3c358ea488c3be4" },
"nfnl": { "branch": "main", "commit": "e43ca4e93d28a43f7b3cb19121afff8abcedbc3f" },
"nvim-bufferline.lua": { "branch": "main", "commit": "2e3c8cc5a57ddd32f1edd2ffd2ccb10c09421f6c" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-code-action-menu": { "branch": "main", "commit": "8c7672a4b04d3cc4edd2c484d05b660a9cb34a1b" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-dap": { "branch": "master", "commit": "281a2e4cd1e7a17cea7ecb1745d84a8ab1249925" },
"nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" },
"nvim-jenkinsfile-linter": { "branch": "main", "commit": "b6b48b0a7aed92ed46bb9e1ab208dce92941f50b" },
"nvim-lspconfig": { "branch": "master", "commit": "911167921d49cd5c1c9b2436031d0da3945e787f" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-scrollbar": { "branch": "main", "commit": "d09f14aa16c9f2748e77008f9da7b1f76e4e7b85" },
"nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
"nvim.lua": { "branch": "master", "commit": "5d57be0b6eea6c06977b1c5fe0752da909cf4154" },
"nvlime": { "branch": "master", "commit": "228e4fa8c7d10b1ed07b1649a63743613b77a828" },
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
"octo.nvim": { "branch": "master", "commit": "0134169886958f3874f16eed7fe73d906a3e7e17" },
"parinfer-rust": { "branch": "master", "commit": "d84828b453e158d06406f6b5e9056f6b54ff76c9" },
"parsley": { "branch": "main", "commit": "c4100aa449bfa971dcfc56ffe4206ba034db08cc" },
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"purescript-vim": { "branch": "main", "commit": "82348352e6568fcc0385bd7c99a8ead3a479feea" },
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
"rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" },
"sad.vim": { "branch": "master", "commit": "2f5b33b239a566ffedaa81cee3051bb613482d1e" },
"stabilize.nvim": { "branch": "master", "commit": "eeb1873daffaba67246188a5668b366e45ed1de1" },
"startuptime.vim": { "branch": "master", "commit": "dfa57f522d6f61793fe5fea65bca7484751b8ca2" },
"tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" },
"targets.vim": { "branch": "master", "commit": "6325416da8f89992b005db3e4517aaef0242602e" },
"telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" },
"telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" },
"todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" },
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
"typescript-vim": { "branch": "master", "commit": "8d169e16b5487771f6568125d4c63e6086e524d9" },
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" },
"vim-exchange": { "branch": "master", "commit": "d6c1e9790bcb8df27c483a37167459bbebe0112e" },
"vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" },
"vim-gh-line": { "branch": "master", "commit": "731751fdfa4f64a061dbc7088cb7b2f12e0828ad" },
"vim-gruvbox8": { "branch": "master", "commit": "008b7773e5f2cba625a5fcc5acc543b28b19cd26" },
"vim-indent-guides": { "branch": "master", "commit": "a1e1390c0136e63e813d051de2003bf0ee18ae30" },
"vim-javascript": { "branch": "master", "commit": "c470ce1399a544fe587eab950f571c83cccfbbdc" },
"vim-jsonc": { "branch": "master", "commit": "0b7ca17da85b5faa813be8ead3ad497e348b2763" },
"vim-jsx": { "branch": "master", "commit": "8879e0d9c5ba0e04ecbede1c89f63b7a0efa24af" },
"vim-nix": { "branch": "master", "commit": "e25cd0f2e5922f1f4d3cd969f92e35a9a327ffb0" },
"vim-raku": { "branch": "master", "commit": "f4496123353cce789fc6645ceb686f5cf51acca3" },
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"vim-smoothie": { "branch": "master", "commit": "df1e324e9f3395c630c1c523d0555a01d2eb1b7e" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-svelte": { "branch": "main", "commit": "0e93ec53c3667753237282926fec626785622c1c" },
"vim-toml": { "branch": "main", "commit": "d36caa6b1cf508a4df1c691f915572fc02143258" },
"vim-tsx": { "branch": "master", "commit": "77c89c42e189fefd3c9a632b37b7e3b3b9edf918" },
"vim-visual-multi": { "branch": "master", "commit": "38b0e8d94a5499ccc17d6159763d32c79f53417b" },
"vim-vsnip": { "branch": "master", "commit": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" },
"vim-vsnip-integ": { "branch": "master", "commit": "1914e72cf3de70df7f5dde476cd299aba2440aef" },
"vimtex": { "branch": "master", "commit": "76ef99f73a5ff10be59836a4af4f928eaa8ad284" },
"webapi-vim": { "branch": "master", "commit": "70c49ada7827d3545a65cbdab04c5c89a3a8464e" },
"which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" },
"yats.vim": { "branch": "master", "commit": "b325c449a2db4d9ee38aa441afa850a815982e8b" },
"yuck.vim": { "branch": "master", "commit": "9b5e0370f70cc30383e1dabd6c215475915fe5c3" }
}

View file

@ -0,0 +1,4 @@
-- [nfnl] Compiled from fnl/dots/basics.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("nfnl.module")
local autoload = _local_1_["autoload"]
return {autoload = autoload, a = autoload("nfnl.core"), str = autoload("nfnl.string"), utils = autoload("dots.utils"), colors = autoload("dots.colors")}

View file

@ -0,0 +1,14 @@
-- [nfnl] Compiled from fnl/dots/colors.fnl by https://github.com/Olical/nfnl, do not edit.
local _1_
if ("epix" == vim.fn.hostname()) then
_1_ = "#1d2021"
else
_1_ = "#282828"
end
local _3_
if ("epix" == vim.fn.hostname()) then
_3_ = "#181A1B"
else
_3_ = "#1d2021"
end
return {bg_main = _1_, bg_second = _3_, dark0_hard = "#1d2021", dark0 = "#282828", dark0_soft = "#32302f", dark1 = "#3c3836", dark2 = "#504945", dark3 = "#665c54", dark4 = "#7c6f64", light0_hard = "#f9f5d7", light0 = "#fbf1c7", light0_soft = "#f2e5bc", light1 = "#ebdbb2", light2 = "#d5c4a1", light3 = "#bdae93", light4 = "#a89984", bright_red = "#fb4934", bright_green = "#b8bb26", bright_yellow = "#fabd2f", bright_blue = "#83a598", bright_purple = "#d3869b", bright_aqua = "#8ec07c", bright_orange = "#fe8019", neutral_red = "#cc241d", neutral_green = "#98971a", neutral_yellow = "#d79921", neutral_blue = "#458588", neutral_purple = "#b16286", neutral_aqua = "#689d6a", neutral_orange = "#d65d0e", faded_red = "#9d0006", faded_green = "#79740e", faded_yellow = "#b57614", faded_blue = "#076678", faded_purple = "#8f3f71", faded_aqua = "#427b58", faded_orange = "#af3a03", gray = "#928374"}

View file

@ -0,0 +1,60 @@
-- [nfnl] Compiled from fnl/dots/help-thingy.fnl by https://github.com/Olical/nfnl, do not edit.
local function help_thingy_kram()
local _local_1_ = require("nfnl.module")
local autoload = _local_1_["autoload"]
local utils = autoload("dots.utils")
local a = autoload("aniseed.core")
local str = autoload("aniseed.string")
local popup = autoload("popup")
local ts = autoload("nvim-treesitter")
local width = 20
for _, line in ipairs(text) do
width = math.max(width, #line)
end
local function _2_()
local bufnr = vim.api.nvim_create_buf(false, true)
vim.api.nvim_buf_set_option(bufnr, "bufhidden", "wipe")
vim.api.nvim_buf_set_option(bufnr, "filetype", ft)
vim.api.nvim_buf_set_lines(bufnr, 0, -1, true, text)
return popup.create(bufnr, {padding = {1, 1, 1, 1}, width = width})
end
defn(pop, {text, ft}, "Open a popup with the given text and filetype", nil, nil, _2_())
local function _3_()
local col = (vim.api.nvim_win_get_cursor(0))[2]
local line = vim.api.nvim_get_current_line()
return (vim.fn.matchstr(line:sub(1, (col + 1)), "\\k*$") .. string.sub(vim.fn.matchstr(line:sub((col + 1)), "^\\k*"), 2))
end
defn(__fnl_global__get_2dcurrent_2dword, {}, "Return the word the cursor is currently hovering over", _3_())
def(__fnl_global__helpfiles_2dpath, str.join("/", a.butlast(str.split(vim.o.helpfile, "/"))))
local entries = {}
for line, _ in io.lines((__fnl_global__helpfiles_2dpath .. "/tags")) do
local _let_4_ = str.split(line, "\9")
local key = _let_4_[1]
local file = _let_4_[2]
local address = _let_4_[3]
entries[key] = {file = (__fnl_global__helpfiles_2dpath .. "/" .. file), address = address}
end
def(tags, nil, nil, entries)
defn(__fnl_global__find_2dhelp_2dtag_2dfor, {topic}, (tags[topic] or tags[(topic .. "()")] or tags[(string.gsub(topic, "vim%.api%.", "") .. "()")] or tags[(string.gsub(topic, "vim%.fn%.", "") .. "()")] or tags[(string.gsub(topic, "fn%.", "") .. "()")] or tags[(string.gsub(topic, "vim%.o%.", "") .. "()")] or tags[(string.gsub(topic, "vim%.b%.", "") .. "()")] or tags[(string.gsub(topic, "vim%.g%.", "") .. "()")]))
local data = nil
for line, _ in io.lines(tag.file) do
if (nil == data) then
if (-1 ~= vim.fn.match(line, (tag.address):sub(2))) then
data = {line}
else
end
else
if ((2 > #data) or ("" == line) or (" " == line:sub(1, 1)) or ("\9" == line:sub(1, 1)) or ("<" == line:sub(1, 1))) then
table.insert(data, line)
else
return data
end
end
end
defn(__fnl_global__help_2dfor_2dtag, {tag}, nil, nil)
_G.get_help = function()
return __fnl_global__if_2dlet({__fnl_global__help_2dtag, __fnl_global__find_2dhelp_2dtag_2dfor(__fnl_global__get_2dcurrent_2dword())}, pop(__fnl_global__help_2dfor_2dtag(__fnl_global__help_2dtag), "help"))
end
return utils.keymap("n", "ML", ":call v:lua.get_help()<CR>")
end
return {}

View file

@ -0,0 +1,105 @@
-- [nfnl] Compiled from fnl/dots/keybinds.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local a = _local_1_["a"]
local str = _local_1_["str"]
local utils = _local_1_["utils"]
local wk = autoload("which-key")
local glance = autoload("glance")
local crates = autoload("crates")
local dap = autoload("dap")
local dapui = autoload("dapui")
vim.g.AutoPairsShortcutBackInsert = "<M-b>"
utils.keymap("n", "K", "<Nop>")
utils.keymap("v", "K", "<Nop>")
utils.keymap("i", "\8", "<C-w>")
utils.keymap("i", "<C-h>", "<C-w>")
utils.keymap("i", "<C-BS>", "<C-w>")
utils.keymap("n", "zt", "zt<c-y><c-y><c-y>")
utils.keymap("n", "zb", "zb<c-e><c-e><c-e>")
utils.keymap("n", "<space>c<space>", "<cmd>call nerdcommenter#Comment(\"m\", \"Toggle\")<CR>", {})
utils.keymap("v", "<space>c<space>", "<cmd>call nerdcommenter#Comment(\"x\", \"Toggle\")<CR>", {})
utils.keymap("n", "<C-LeftMouse>", "<LeftMouse><cmd>lua vim.lsp.buf.definition()<CR>")
utils.keymap("n", "<A-LeftMouse>", "<Esc><LeftMouse><cmd>lua vim.lsp.buf.hover()<CR>")
utils.keymap({"n", "v"}, "<space><space>c", "\"+y")
utils.keymap("n", "<a-s-j>", "<cmd>RustMoveItemDown<cr>j")
utils.keymap("n", "<a-s-k>", "<cmd>RustMoveItemUp<cr>k")
utils.keymap("n", "<Backspace>", "<cmd>HopChar2<CR>")
local function open_selection_zotero()
local _, _0, sel = utils["get-selection"]()
return vim.cmd(("silent !xdg-open zotero://select/items/@" .. str.join(sel)))
end
local function key_map(obj)
local tbl_21_auto = {}
local i_22_auto = 0
for key, val in pairs(obj) do
local val_23_auto = utils.prepend(key, val)
if (nil ~= val_23_auto) then
i_22_auto = (i_22_auto + 1)
tbl_21_auto[i_22_auto] = val_23_auto
else
end
end
return tbl_21_auto
end
local function m(bind, desc)
return {bind, desc = desc}
end
local function cmd(s, desc)
return utils.prepend(("<cmd>" .. s .. "<cr>"), {desc = desc})
end
local function sel_cmd(s, desc)
return utils.prepend(("<cmd>'<,'>" .. s .. "<cr>"), {desc = desc})
end
local function rebind(s, desc)
return m(s, desc)
end
local function format()
local function _3_(_241)
return _241.server_capabilities.documentFormattingProvider
end
if a.some(_3_, vim.lsp.get_active_clients()) then
return vim.lsp.buf.format({async = true})
else
return vim.cmd("Neoformat")
end
end
local function open_rename()
return vim.api.nvim_feedkeys((":IncRename " .. vim.fn.expand("<cword>")), "n", "")
end
local function toggle_lsp_lines()
vim.diagnostic.config({virtual_lines = not vim.diagnostic.config().virtual_lines})
return vim.diagnostic.config({virtual_text = not vim.diagnostic.config().virtual_lines})
end
local function toggle_lsp_lines_current()
return vim.diagnostic.config({virtual_lines = {only_current_line = true}})
end
wk.setup({})
local function _5_()
vim.o.spell = not vim.o.spell
return nil
end
local function _6_()
return vim.diagnostic.open_float({scope = "cursor"})
end
local function _7_()
return vim.diagnostic.open_float({})
end
local function _8_()
return glance.open("definitions")
end
local function _9_()
return glance.open("references")
end
local function _10_()
return glance.open("type_definitions")
end
local function _11_()
return glance.open("implementations")
end
wk.add(key_map({["<leader>c"] = {group = "+Crates"}, ["<leader>e"] = {group = "+emmet"}, ["<leader>["] = cmd("HopWord", "Hop to a word"), ["<leader>h"] = cmd("bprevious", "previous buffer"), ["<leader>l"] = cmd("bnext", "next buffer"), ["<leader>o"] = cmd("Telescope live_grep", "Grep files"), ["<leader>P"] = cmd("Telescope frecency frecency default_text=:CWD:", "Frecency magic"), ["<leader>p"] = cmd("Telescope find_files", "Open file-browser"), ["<leader>:"] = cmd("Telescope commands", "Search command with fzf"), ["<leader>s"] = cmd("w", "Save file"), ["<leader>g"] = cmd("Neogit", "Git"), ["<leader>n"] = m(require("persistence").load, "Load last session"), ["<leader>d"] = {group = "+Debugging"}, ["<leader>db"] = m(dap.toggle_breakpoint, "toggle breakpoint"), ["<leader>du"] = m(dapui.toggle, "toggle dapui"), ["<leader>dc"] = m(dap.step_into, "continue"), ["<leader>dr"] = m(dap.repl.open, "open repl"), ["<leader>ds"] = {group = "+Step"}, ["<leader>dso"] = m(dap.step_over, "over"), ["<leader>dsu"] = m(dap.step_out, "out"), ["<leader>dsi"] = m(dap.step_into, "into"), ["<leader>m"] = {group = "+Code actions"}, ["<leader>m;"] = m(_5_, "Toggle spell checking"), ["<leader>md"] = m(vim.lsp.buf.hover, "Show documentation"), ["<leader>mo"] = cmd("SymbolsOutline", "Outline"), ["<leader>mS"] = cmd("Telescope lsp_document_symbols", "Symbols in document"), ["<leader>ms"] = cmd("Telescope lsp_dynamic_workspace_symbols", "Symbols in workspace"), ["<leader>mT"] = m(vim.lsp.buf.signature_help, "Show signature help"), ["<leader>mn"] = m(open_rename, "Rename"), ["<leader>mv"] = cmd("CodeActionMenu", "Apply codeaction"), ["<leader>mA"] = m(_6_, "Cursor diagnostics"), ["<leader>ma"] = m(_7_, "Line diagnostics"), ["<leader>mh"] = cmd("RustToggleInlayHints", "Toggle inlay hints"), ["<leader>mr"] = cmd("Trouble lsp_references", "Show references"), ["<leader>mE"] = cmd("Trouble document_diagnostics", "List diagnostics"), ["<leader>me"] = cmd("Trouble workspace_diagnostics", "Show diagnostics"), ["<leader>mt"] = cmd("Trouble lsp_type_definitions", "Go to type-definition"), ["<leader>mi"] = cmd("Trouble lsp_implementations", "Show implementation"), ["<leader>mg"] = cmd("Trouble lsp_definitions", "Go to definition"), ["<leader>mw"] = m(toggle_lsp_lines, "Toggle LSP lines"), ["<leader>mW"] = m(toggle_lsp_lines_current, "Toggle LSP line"), ["<leader>mf"] = m(format, "format file"), ["<leader>m,"] = cmd("RustRunnables", "Run rust stuff"), ["<leader>mx"] = {group = "+Glance"}, ["<leader>mxd"] = m(_8_, "Definitions"), ["<leader>mxr"] = m(_9_, "References"), ["<leader>mxt"] = m(_10_, "Type definitions"), ["<leader>mxi"] = m(_11_, "Implementations"), ["<leader>mcj"] = m(crates.show_popup, "crates popup"), ["<leader>mcf"] = m(crates.show_features_popup, "crate features"), ["<leader>mcv"] = m(crates.show_versions_popup, "crate versions"), ["<leader>mcd"] = m(crates.show_dependencies_popup, "crate dependencies"), ["<leader>mch"] = m(crates.open_documentation, "crate documentation"), ["<leader>f"] = {group = "+folds"}, ["<leader>fo"] = cmd("foldopen", "open fold"), ["<leader>fn"] = cmd("foldclose", "close fold"), ["<leader>fj"] = rebind("zj", "jump to next fold"), ["<leader>fk"] = rebind("zk", "jump to previous fold"), ["<leader>v"] = {group = "+view-and-layout"}, ["<leader>vn"] = cmd("set relativenumber!", "toggle relative numbers"), ["<leader>vm"] = cmd("set nonumber! norelativenumber", "toggle numbers"), ["<leader>vg"] = cmd("ZenMode", "toggle zen mode"), ["<leader>vi"] = cmd("IndentGuidesToggle", "toggle indent guides"), ["<leader>vw"] = cmd("set wrap! linebreak!", "toggle linewrapping"), ["<leader>b"] = {group = "+buffers"}, ["<leader>bb"] = cmd(":Telescope buffers", "select open buffer"), ["<leader>bc"] = cmd(":Bdelete!", "close open buffer"), ["<leader>bw"] = cmd(":Bwipeout!", "wipeout open buffer")}))
wk.add(key_map({["<tab>"] = {hidden = true}, gss = {desc = "init selection"}, z = {group = "folds"}, zc = m("<cmd>foldclose<cr>", "close fold"), zo = m("<cmd>foldopen<cr>", "open fold")}))
wk.add(key_map({["<tab>"] = {hidden = true, mode = "i"}}))
wk.add(utils.prepend(key_map({["<leader>s"] = sel_cmd("VSSplit", "keep selection visible in split"), ["<leader>z"] = m(open_selection_zotero, "open in zotero"), gs = {group = "+Selection"}, gsj = {desc = "increment selection"}, gsk = {desc = "decrement selection"}, gsl = {desc = "increment node"}, gsh = {desc = "decrement node"}}), {mode = "v"}))
vim.o.timeoutlen = 200
return nil

View file

@ -0,0 +1,24 @@
-- [nfnl] Compiled from fnl/dots/plugins/bufferline.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local a = _local_1_["a"]
local utils = _local_1_["utils"]
local colors = _local_1_["colors"]
local bufferline = autoload("bufferline")
vim.cmd("hi link BufferLineTabSeparatorSelected BufferLineSeparatorSelected")
vim.cmd("hi link BufferLineTabSeparator BufferLineSeparator")
local function mk_active(fg)
return {bg = colors.neutral_aqua, fg = fg, bold = false, italic = false}
end
local function mk_visible(fg)
return {bg = colors.dark1, fg = fg, bold = false, italic = false}
end
local function setup()
local selected = {bg = colors.neutral_aqua, fg = colors.bg_main, gui = "NONE"}
local visible = {bg = colors.dark1, fg = colors.neutral_aqua}
local function _2_(cnt, _lvl, _diagnostics_dict)
return (" (" .. cnt .. ")")
end
return bufferline.setup({options = {diagnostics = "nvim_lsp", diagnostics_indicator = _2_, tab_size = 10, enforce_regular_tabs = false, show_buffer_close_icons = false, show_buffer_icons = false, show_close_icon = false, show_tab_indicators = false}, highlights = {fill = {bg = colors.bg_main, fg = colors.light0}, background = visible, buffer_visible = visible, buffer_selected = a.assoc(selected, "bold", false, "italic", false), modified = visible, modified_visible = visible, modified_selected = selected, hint = visible, hint_visible = visible, hint_selected = selected, info = visible, info_visible = visible, info_selected = selected, warning = visible, warning_visible = visible, warning_selected = selected, error = visible, error_visible = visible, error_selected = selected, duplicate = visible, duplicate_visible = visible, duplicate_selected = selected, diagnostic = mk_visible(colors.neutral_red), diagnostic_visible = mk_visible(colors.neutral_red), diagnostic_selected = mk_active(colors.faded_red), info_diagnostic = mk_visible(colors.neutral_blue), info_diagnostic_visible = mk_visible(colors.neutral_blue), info_diagnostic_selected = mk_active(colors.faded_blue), hint_diagnostic = mk_visible(colors.neutral_yellow), hint_diagnostic_visible = mk_visible(colors.neutral_yellow), hint_diagnostic_selected = mk_active(colors.faded_orange), warning_diagnostic = mk_visible(colors.neutral_orange), warning_diagnostic_visible = mk_visible(colors.neutral_orange), warning_diagnostic_selected = mk_active(colors.faded_orange), error_diagnostic = mk_visible(colors.neutral_red), error_diagnostic_visible = mk_visible(colors.neutral_red), error_diagnostic_selected = mk_active(colors.red), separator = visible, separator_visible = {bg = colors.red}, separator_selected = {bg = colors.red}, indicator_selected = {bg = colors.neutral_aqua, fg = colors.neutral_aqua, bold = false, italic = false}, tab_separator = {bg = colors.red}, tab_separator_selected = {bg = colors.neutral_aqua, fg = colors.neutral_aqua}, pick_selected = {bg = colors.bright_red, fg = colors.bright_red}, tab_selected = {bg = colors.bright_green, fg = colors.bright_green}, tab = {bg = colors.bright_yellow, fg = colors.bright_yellow}}})
end
return {utils.plugin("akinsho/nvim-bufferline.lua", {config = setup, tag = "v4.7.0"})}

View file

@ -0,0 +1,51 @@
-- [nfnl] Compiled from fnl/dots/plugins/cmp.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local utils = _local_1_["utils"]
local cmp = autoload("cmp")
local function item_formatter(item, vim_item)
do
local padding = string.rep(" ", (10 - vim.fn.strwidth(vim_item.abbr)))
local details
do
local t_2_ = item
if (nil ~= t_2_) then
t_2_ = t_2_.completion_item
else
end
if (nil ~= t_2_) then
t_2_ = t_2_.detail
else
end
details = t_2_
end
if details then
vim_item.abbr = (vim_item.abbr .. padding .. " " .. details)
else
end
end
return vim_item
end
local function setup()
local function _6_(args)
return vim.fn["vsnip#anonymous"](args.body)
end
local function _7_()
cmp.mapping.close()
return vim.cmd("stopinsert")
end
local function _8_(_241, _242)
if ((15 == _241:get_kind()) and (15 == _242:get_kind())) then
return nil
elseif (15 == _241:get_kind()) then
return false
elseif (15 == _242:get_kind()) then
return true
else
return nil
end
end
cmp.setup({snippet = {expand = _6_}, completion = {autocomplete = false}, mapping = cmp.mapping.preset.insert({["<C-d>"] = cmp.mapping.scroll_docs(-4), ["<C-f>"] = cmp.mapping.scroll_docs(4), ["<C-space>"] = cmp.mapping.complete(), ["<esc>"] = _7_, ["<CR>"] = cmp.mapping.confirm({select = true})}), experimental = {custom_menu = true}, sources = {{name = "nvim_lsp", priority = 5}, {name = "vsnip", priority = 3}, {name = "nvim_lua"}, {name = "calc"}, {name = "path"}, {name = "nvim_lsp_signature_help"}, {name = "conventionalcommits"}, {name = "crates"}}, formatting = {format = item_formatter}, sorting = {priority_weight = 2, comparators = {_8_, cmp.config.compare.offset, cmp.config.compare.exact, cmp.config.compare.score, cmp.config.compare.kind, cmp.config.compare.sort_text, cmp.config.compare.length, cmp.config.compare.order}}})
return cmp.setup.cmdline("/", {sources = {{name = "buffer"}}})
end
return {utils.plugin("hrsh7th/vim-vsnip", {lazy = true, event = {"VeryLazy"}}), utils.plugin("hrsh7th/vim-vsnip-integ", {lazy = true, event = {"VeryLazy"}}), utils.plugin("rafamadriz/friendly-snippets"), utils.plugin("hrsh7th/nvim-cmp", {lazy = true, event = {"VeryLazy"}, dependencies = {{"hrsh7th/cmp-nvim-lsp"}, {"hrsh7th/cmp-buffer"}, {"hrsh7th/cmp-vsnip"}, {"hrsh7th/cmp-nvim-lua"}, {"hrsh7th/cmp-calc"}, {"hrsh7th/cmp-path"}, {"hrsh7th/cmp-nvim-lsp-signature-help"}, {"davidsierradz/cmp-conventionalcommits"}, {"hrsh7th/cmp-omni"}}, config = setup})}

View file

@ -0,0 +1,3 @@
-- [nfnl] Compiled from fnl/dots/plugins/copilot.fnl by https://github.com/Olical/nfnl, do not edit.
local utils = require("dots.utils")
return {utils.plugin("zbirenbaum/copilot.lua", {cmd = "Copilot", event = "InsertEnter", opts = {panel = {enabled = false}, suggestion = {enabled = true, auto_trigger = "true", keymap = {accept = "<tab>", next = "<C-l><C-n>"}}}})}

View file

@ -0,0 +1,10 @@
-- [nfnl] Compiled from fnl/dots/plugins/diffview.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local utils = _local_1_["utils"]
local cb = autoload("diffview.config")
local diffview = autoload("diffview")
local function _2_()
return diffview.setup({file_panel = {width = 35, use_icons = false}, key_bindings = {view = {["<leader>dn"] = cb.diffview_callback("select_next_entry"), ["<leader>dp"] = cb.diffview_callback("select_prev_entry"), ["<leader>dd"] = cb.diffview_callback("toggle_files")}}, diff_binaries = false})
end
return {utils.plugin("sindrets/diffview.nvim", {cmd = {"DiffviewOpen", "DiffviewToggleFiles"}, config = _2_})}

View file

@ -0,0 +1,9 @@
-- [nfnl] Compiled from fnl/dots/plugins/emmet.fnl by https://github.com/Olical/nfnl, do not edit.
local utils = require("dots.utils")
local function setup()
vim.g.user_emmet_mode = "n"
vim.g.user_emmet_leader_key = "<leader>e"
vim.g.user_emmet_settings = {["javascript.jsx"] = {extends = "jsx"}, ["typescript.jsx"] = {extends = "jsx"}}
return nil
end
return {utils.plugin("mattn/emmet-vim", {lazy = true, config = setup})}

View file

@ -0,0 +1,113 @@
-- [nfnl] Compiled from fnl/dots/plugins/feline.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local utils = _local_1_["utils"]
local a = _local_1_["a"]
local str = _local_1_["str"]
local colors = _local_1_["colors"]
local feline = autoload("feline")
local function setup()
vim.opt.termguicolors = true
local modes = {n = {text = "NORMAL", color = colors.neutral_aqua}, i = {text = "INSERT", color = colors.neutral_yellow}, c = {text = "CMMAND", color = colors.neutral_aqua}, ce = {text = "NORMEX", color = colors.neutral_aqua}, cv = {text = "EX", color = colors.neutral_aqua}, ic = {text = "INSCOMP", color = colors.neutral_aqua}, no = {text = "OP-PENDING", color = colors.neutral_aqua}, r = {text = "HIT-ENTER", color = colors.neutral_aqua}, ["r?"] = {text = "CONFIRM", color = colors.neutral_aqua}, R = {text = "REPLACE", color = colors.neutral_aqua}, Rv = {text = "VIRTUAL", color = colors.neutral_aqua}, s = {text = "SELECT", color = colors.neutral_aqua}, S = {text = "SELECT", color = colors.neutral_aqua}, t = {text = "TERM", color = colors.neutral_aqua}, v = {text = "VISUAL", color = colors.neutral_blue}, V = {text = "VISUAL LINE", color = colors.neutral_blue}, ["\22"] = {text = "VISUAL BLOCK", color = colors.neutral_blue}}
local bar_bg = colors.bg_main
local horiz_separator_color = colors.light1
local function or_empty(x)
return (x or "")
end
local function spaces(x)
if x then
return (" " .. x .. " ")
else
return ""
end
end
local function get_current_filepath()
local file = utils["shorten-path"](vim.fn.bufname(), 30, 30)
if a["empty?"](file) then
return ""
elseif vim.bo.readonly then
return ("RO " .. file)
elseif (vim.bo.modifiable and vim.bo.modified) then
return (file .. " \226\151\143")
else
return (file .. " ")
end
end
local function vim_mode_hl(use_as_fg_3f)
local color = modes[vim.fn.mode()].color
if use_as_fg_3f then
return {bg = bar_bg, fg = color}
else
return {bg = color, fg = bar_bg}
end
end
local function git_status_provider()
local function _5_(_241)
return ("master" ~= _241)
end
local function _7_()
local t_6_ = vim.b
if (nil ~= t_6_) then
t_6_ = t_6_.gitsigns_status_dict
else
end
if (nil ~= t_6_) then
t_6_ = t_6_.head
else
end
return t_6_
end
return or_empty(utils["keep-if"](_5_, _7_()))
end
local function vim_mode()
return (" " .. (modes[vim.fn.mode()].text or vim.fn.mode) .. " ")
end
local function lsp_progress_provider()
return vim.lsp.status()
end
local function lsp_diagnostic_component(kind, color)
local function _10_()
return (0 ~= #vim.diagnostic.get(0, {severity = kind}))
end
local function _11_()
return spaces(#vim.diagnostic.get(0, {severity = kind}))
end
return {enabled = _10_, provider = _11_, left_sep = "", right_sep = "", hl = {fg = bar_bg, bg = color}}
end
local function coordinates()
local _let_12_ = vim.api.nvim_win_get_cursor(0)
local line = _let_12_[1]
local col = _let_12_[2]
return (" " .. line .. ":" .. col .. " ")
end
local function inactive_separator_provider()
if (vim.fn.winnr() ~= vim.fn.winnr("j")) then
return string.rep("\226\148\128", vim.api.nvim_win_get_width(0))
else
return ""
end
end
local components = {active = {}, inactive = {}}
local function _14_()
return vim_mode_hl(false)
end
local function _15_()
return vim_mode_hl(true)
end
components.active[1] = {{provider = vim_mode, hl = _14_}, {provider = get_current_filepath, left_sep = " ", hl = {fg = colors.light4}}, {provider = git_status_provider, left_sep = " ", hl = _15_}}
local function _16_()
return (0 < #vim.lsp.buf_get_clients())
end
components.active[2] = {{provider = lsp_progress_provider, left_sep = " ", right_sep = " ", enabled = _16_}}
local function _17_()
return vim_mode_hl(true)
end
local function _18_()
return vim_mode_hl(false)
end
components.active[3] = {{provider = vim.bo.filetype, right_sep = " ", hl = _17_}, lsp_diagnostic_component(vim.diagnostic.severity.INFO, colors.neutral_green), lsp_diagnostic_component(vim.diagnostic.severity.HINT, colors.neutral_aqua), lsp_diagnostic_component(vim.diagnostic.severity.WARN, colors.neutral_yellow), lsp_diagnostic_component(vim.diagnostic.severity.ERROR, colors.neutral_red), {provider = coordinates, hl = _18_}}
components.inactive[1] = {{provider = inactive_separator_provider, hl = {bg = "NONE", fg = horiz_separator_color}}}
utils["highlight-add"]("StatusLineNC", {bg = "NONE", fg = colors.light1})
return feline.setup({theme = {fg = colors.light1, bg = colors.bg_main}, components = components})
end
return {utils.plugin("Famiu/feline.nvim", {config = setup})}

View file

@ -0,0 +1,5 @@
-- [nfnl] Compiled from fnl/dots/plugins/flutter-tools.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local utils = _local_1_["utils"]
return {utils.plugin("akinsho/flutter-tools.nvim", {config = true, dependencies = {"nvim-lua/plenary.nvim", "stevearc/dressing.nvim"}, lazy = false})}

View file

@ -0,0 +1,11 @@
-- [nfnl] Compiled from fnl/dots/plugins/gitsigns.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("nfnl.module")
local autoload = _local_1_["autoload"]
local utils = autoload("dots.utils")
local gitsigns = autoload("gitsigns")
local function setup()
gitsigns.setup({signs = {add = {text = "\226\150\141"}, change = {text = "\226\150\141"}, delete = {text = "\226\150\141"}, topdelete = {text = "\226\150\141"}, changedelete = {text = "\226\150\141"}}, update_debounce = 100, current_line_blame = false})
local scrollbar_gitsigns = require("scrollbar.handlers.gitsigns")
return scrollbar_gitsigns.setup()
end
return {utils.plugin("lewis6991/gitsigns.nvim", {dependencies = {"vim-gruvbox8", "petertriho/nvim-scrollbar"}, config = setup})}

View file

@ -0,0 +1,111 @@
-- [nfnl] Compiled from fnl/dots/plugins/gruvbox8.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("nfnl.module")
local autoload = _local_1_["autoload"]
local utils = autoload("dots.utils")
local colors = autoload("dots.colors")
local function setup()
vim.g.gruvbox_italics = 0
vim.g.gruvbox_italicise_strings = 0
vim.g.gruvbox_filetype_hi_groups = 1
vim.g.gruvbox_plugin_hi_groups = 1
local function setup_colors()
utils["highlight-add"]({"GruvboxBlueSign", "GruvboxAquaSign", "GruvboxRedSign", "GruvboxYellowSign", "GruvboxGreenSign", "GruvboxOrangeSign", "GruvboxPurpleSign"}, {bg = "NONE"})
utils.highlight("EndOfBuffer", {bg = "NONE", fg = colors.bg_main})
utils.highlight("LineNr", {bg = "NONE"})
utils["highlight-add"]("Pmenu", {bg = colors.bg_second})
utils["highlight-add"]("PmenuSel", {bg = colors.bright_aqua})
utils["highlight-add"]("PmenuSbar", {bg = colors.bg_second})
utils["highlight-add"]("PmenuThumb", {bg = colors.dark1})
utils["highlight-add"]("NormalFloat", {bg = colors.bg_second})
utils["highlight-add"]("SignColumn", {bg = colors.bg_main})
utils["highlight-add"]("FloatBorder", {bg = colors.bg_second})
utils["highlight-add"]("SpecialComment", {fg = colors.dark4})
utils["highlight-add"]({"LspDiagnosticsSignError", "LspDiagnosticsSignWarning", "LspDiagnosticsSignInformation", "LspDiagnosticsSignHint"}, {bg = "NONE"})
utils["highlight-add"]("DiagnosticError", {fg = colors.bright_red})
utils["highlight-add"]("DiagnosticWarning", {fg = colors.bright_orange})
utils["highlight-add"]("DiagnosticInformation", {fg = colors.bright_aqua})
utils["highlight-add"]("DiagnosticHint", {fg = colors.bright_yellow})
utils["highlight-add"]("DiagnosticVirtualTextError", {bg = "#342828", fg = colors.bright_red})
utils["highlight-add"]("DiagnosticVirtualTextWarning", {bg = "#473027", fg = colors.bright_orange})
utils["highlight-add"]("DiagnosticVirtualTextWarning", {bg = "#3b2c28", fg = colors.bright_orange})
utils["highlight-add"]("DiagnosticVirtualTextInformation", {bg = "#272d2f", fg = colors.bright_aqua})
utils["highlight-add"]("DiagnosticVirtualTextHint", {bg = "#272d2f", fg = colors.bright_yellow})
utils.highlight("LspDiagnosticsUnderlineError", {gui = "undercurl"})
utils.highlight("StatusLine", {bg = colors.dark1, fg = colors.light0})
vim.cmd("highlight link Function GruvboxGreen")
return utils["highlight-add"]("Function", {gui = "NONE"})
end
local function setup_telescope_theme()
local prompt = "blacker"
if (prompt == "bright") then
local promptbg = "#689d6a"
utils["highlight-add"]("TelescopePromptBorder", {bg = promptbg, fg = promptbg})
utils["highlight-add"]("TelescopePromptNormal", {bg = promptbg, fg = colors.bg_main})
utils["highlight-add"]("TelescopePromptTitle", {bg = promptbg, fg = colors.dark1})
elseif (prompt == "dark") then
local promptbg = "#252525"
utils["highlight-add"]("TelescopePromptBorder", {bg = promptbg, fg = promptbg})
utils["highlight-add"]("TelescopePromptNormal", {bg = promptbg, fg = colors.light2})
utils["highlight-add"]("TelescopePromptPrefix", {bg = promptbg, fg = colors.neutral_aqua})
utils["highlight-add"]("TelescopePromptTitle", {bg = colors.neutral_blue, fg = colors.dark1})
elseif (prompt == "black") then
local promptbg = "#212526"
utils["highlight-add"]("TelescopePromptBorder", {bg = promptbg, fg = promptbg})
utils["highlight-add"]("TelescopePromptNormal", {bg = promptbg, fg = colors.light2})
utils["highlight-add"]("TelescopePromptPrefix", {bg = promptbg, fg = colors.neutral_aqua})
utils["highlight-add"]("TelescopePromptTitle", {bg = colors.neutral_green, fg = colors.dark1})
elseif (prompt == "blacker") then
local promptbg = "#1f2324"
utils["highlight-add"]("TelescopePromptBorder", {bg = promptbg, fg = promptbg})
utils["highlight-add"]("TelescopePromptNormal", {bg = promptbg, fg = colors.light2})
utils["highlight-add"]("TelescopePromptPrefix", {bg = promptbg, fg = colors.neutral_aqua})
utils["highlight-add"]("TelescopePromptTitle", {bg = colors.neutral_blue, fg = colors.dark1})
else
end
local side = "darker"
if (side == "brighter") then
local previewbg = "#1f2324"
utils["highlight-add"]("TelescopePreviewNormal", {bg = previewbg})
utils["highlight-add"]("TelescopePreviewBorder", {bg = previewbg, fg = previewbg})
elseif (side == "darker") then
local previewbg = "#1a1e1f"
utils["highlight-add"]("TelescopePreviewNormal", {bg = previewbg})
utils["highlight-add"]("TelescopePreviewBorder", {bg = previewbg, fg = previewbg})
else
end
utils["highlight-add"]("TelescopeBorder", {bg = colors.bg_second, fg = colors.bg_second})
utils["highlight-add"]("TelescopeNormal", {bg = colors.bg_second})
utils["highlight-add"]("TelescopePreviewTitle", {bg = colors.neutral_green, fg = colors.dark1})
utils["highlight-add"]("TelescopeResultsTitle", {bg = colors.neutral_aqua, fg = colors.dark1})
return utils["highlight-add"]("TelescopeSelection", {bg = colors.neutral_aqua, fg = colors.dark1})
end
local function setup_noice_theme()
utils["highlight-add"]("NoicePopupmenu", {bg = colors.bg_second})
utils["highlight-add"]("NoiceCmdline", {bg = "#1f2324"})
utils["highlight-add"]("NoiceCmdlinePopup", {bg = "#1f2324"})
utils["highlight-add"]("NoiceCmdlinePrompt", {bg = "#1f2324"})
utils["highlight-add"]("NoiceCmdlinePopupBorder", {fg = colors.bright_aqua})
return utils["highlight-add"]("NoiceCmdlineIcon", {fg = colors.bright_aqua})
end
vim.api.nvim_create_autocmd("ColorScheme", {pattern = "*", callback = setup_colors})
setup_colors()
vim.api.nvim_create_autocmd("ColorScheme", {pattern = "*", callback = setup_telescope_theme})
setup_telescope_theme()
vim.api.nvim_create_autocmd("ColorScheme", {pattern = "*", callback = setup_noice_theme})
setup_noice_theme()
local function _4_()
utils["highlight-add"]("GitSignsAdd", {gui = "NONE", bg = "NONE", fg = colors.bright_aqua})
utils["highlight-add"]("GitSignsDelete", {gui = "NONE", bg = "NONE", fg = colors.neutral_red})
utils["highlight-add"]("GitSignsChange", {gui = "NONE", bg = "NONE", fg = colors.bright_blue})
utils["highlight-add"]("ScrollbarGitAdd", {gui = "NONE", bg = "NONE", fg = colors.bright_aqua})
utils["highlight-add"]("ScrollbarGitDelete", {gui = "NONE", bg = "NONE", fg = colors.neutral_red})
return utils["highlight-add"]("ScrollbarGitChange", {gui = "NONE", bg = "NONE", fg = colors.bright_blue})
end
vim.api.nvim_create_autocmd("ColorScheme", {pattern = "*", callback = _4_})
if ("epix" == vim.fn.hostname()) then
return vim.cmd("colorscheme gruvbox8_hard")
else
return vim.cmd("colorscheme gruvbox8")
end
end
return {utils.plugin("lifepillar/vim-gruvbox8", {priority = 1000, config = setup, lazy = false})}

View file

@ -0,0 +1,166 @@
-- [nfnl] Compiled from fnl/dots/plugins/lsp.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local a = _local_1_["a"]
local utils = _local_1_["utils"]
local lsp = autoload("lspconfig")
local lsp_configs = autoload("lspconfig/configs")
local cmp_nvim_lsp = autoload("cmp_nvim_lsp")
local function setup()
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {virtual_text = {prefix = "\226\151\134"}, severity_sort = true, signs = false, update_in_insert = false})
local function on_attach(client, bufnr)
if client.server_capabilities.documentHighlight then
utils.highlight("LspReferenceRead", {gui = "underline"})
utils.highlight("LspReferenceText", {gui = "underline"})
utils.highlight("LspReferenceWrite", {gui = "underline"})
return vim.api.nvim_exec("augroup lsp_document_highlight\n autocmd! * <buffer> \n autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight() \n autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()\n augroup END", false)
else
return nil
end
end
local function better_root_pattern(patterns, except_patterns)
local function _3_(path)
if not lsp.util.root_pattern(except_patterns)(path) then
return lsp.util.root_pattern(patterns)(path)
else
return nil
end
end
return _3_
end
local default_capabilities
do
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
default_capabilities = cmp_nvim_lsp.default_capabilities(capabilities)
end
local function init_lsp(lsp_name, _3fopts)
local merged_opts = a.merge({on_attach = on_attach, capabilities = default_capabilities}, (_3fopts or {}))
return lsp[lsp_name].setup(merged_opts)
end
local function _5_()
return vim.lsp.buf.range_formatting({}, {0, 0}, {vim.fn.line("$"), 0})
end
init_lsp("jsonls", {commands = {Format = {_5_}}})
init_lsp("denols", {root_dir = better_root_pattern({".git"}, {"package.json"})})
init_lsp("hls", {settings = {languageServerHaskell = {formattingProvider = "stylish-haskell"}}})
init_lsp("ocamllsp")
init_lsp("vimls")
init_lsp("gopls")
init_lsp("bashls")
init_lsp("erlangls")
init_lsp("yamlls")
init_lsp("html")
init_lsp("svelte")
init_lsp("elmls")
init_lsp("texlab")
init_lsp("pyright")
init_lsp("vls")
init_lsp("perlls")
init_lsp("powershell_es", {bundle_path = "/home/leon/powershell"})
init_lsp("clangd")
init_lsp("cssls", {filestypes = {"css", "scss", "less", "stylus"}, root_dir = lsp.util.root_pattern({"package.json", ".git"}), settings = {css = {validate = true}, less = {validate = true}, scss = {validate = true}}})
local function _6_(client, bufnr)
client.resolved_capabilities.document_formatting = false
return on_attach(client, bufnr)
end
lsp.tsserver.setup({root_dir = lsp.util.root_pattern("package.json"), on_attach = _6_})
do
local rustaceanvim = require("rustaceanvim")
local rustaceanvim_config = require("rustaceanvim.config")
local extension_path = "/home/leon/.vscode/extensions/vadimcn.vscode-lldb-1.6.8/"
local codelldb_path = (extension_path .. "adapter/codelldb")
local liblldb_path = (extension_path .. "lldb/lib/liblldb.so")
local features = nil
vim.g.rustaceanvim = {tools = {inlay_hints = {show_parameter_hints = false}, autoSetHints = false}, dap = {adapter = rustaceanvim_config.get_codelldb_adapter(codelldb_path, liblldb_path)}, server = {on_attach = on_attach, capabilities = default_capabilities, settings = {["rust-analyzer"] = {cargo = {loadOutDirsFromCheck = true, features = (features or "all"), noDefaultFeatures = (nil ~= features)}, procMacro = {enable = true}, diagnostics = {experimental = {enable = false}, enable = false}, checkOnSave = {overrideCommand = {"cargo", "clippy", "--workspace", "--message-format=json", "--all-targets", "--all-features"}}}}}}
end
if (true or not lsp.fennel_language_server) then
lsp_configs["fennel_language_server"] = {default_config = {cmd = "/Users/leon/.cargo/bin/fennel-language-server", filetypes = {"fennel"}, single_file_support = true, root_dir = lsp.util.root_pattern({"fnl", "init.lua"}), settings = {fennel = {workspace = {library = vim.api.nvim_list_runtime_paths()}, diagnostics = {globals = {"vim"}}}}}}
else
end
init_lsp("fennel_language_server", {root_dir = lsp.util.root_pattern({"fnl", "init.lua"}), settings = {fennel = {workspace = {library = vim.api.nvim_list_runtime_paths()}, diagnostics = {globals = {"vim", "comment"}}}}})
--[[ (when (not lsp.prolog_lsp) (tset lsp-configs "prolog_lsp" {:default_config {:cmd ["swipl" "-g" "use_module(library(lsp_server))." "-g" "lsp_server:main" "-t" "halt" "--" "stdio"] :filetypes ["prolog"] :root_dir (fn [fname] (or (lsp.util.find_git_ancestor fname) (vim.loop.os_homedir))) :settings {}}})) (lsp.prolog_lsp.setup {}) ]]
--[[ (let [ewwls-path "/home/leon/coding/projects/ls-eww/crates/ewwls/target/debug/ewwls"] (when (vim.fn.filereadable ewwls-path) (when (not lsp.ewwls) (set lsp-configs.ewwls {:default_config {:cmd [ewwls-path] :filetypes ["yuck"] :root_dir (fn [fname] (or (lsp.util.find_git_ancestor fname) (vim.loop.os_homedir))) :settings {}}})) (init-lsp "ewwls"))) ]]
local autostart_semantic_highlighting = true
local function refresh_semantic_highlighting()
if autostart_semantic_highlighting then
vim.lsp.buf_request(0, "textDocument/semanticTokens/full", {textDocument = vim.lsp.util.make_text_document_params()}, nil)
return vim.NIL
else
return nil
end
end
if not lsp.idris2_lsp then
local function _9_(new_config, new_root_dir)
new_config.cmd = {"idris2-lsp"}
new_config.capabilities.workspace.semanticTokens = {refreshSupport = true}
return nil
end
local function _10_(fname)
local scandir = require("plenary.scandir")
local function find_ipkg_ancestor(fname0)
local function _11_(path)
local res = scandir.scan_dir(path, {depth = 1, search_pattern = ".+%.ipkg"})
if not vim.tbl_isempty(res) then
return path
else
return nil
end
end
return lsp.util.search_ancestors(fname0, _11_)
end
return ((find_ipkg_ancestor(fname) or lsp.util.find_git_ancestor(fname)) or vim.loop.os_homedir())
end
lsp_configs.idris2_lsp = {default_config = {cmd = {"idris2-lsp"}, filetypes = {"idris2"}, on_new_config = _9_, root_dir = _10_, settings = {}}}
else
end
local function _14_(err, method, result, client_id, bufnr, config)
local client = vim.lsp.get_client_by_id(client_id)
local legend = client.server_capabilities.semanticTokensProvider.legend
local token_types = legend.tokenTypes
local data = result.data
local ns = vim.api.nvim_create_namespace("nvim-lsp-semantic")
vim.api.nvim_buf_clear_namespace(bufnr, ns, 0, ( - 1))
local tokens = {}
local prev_line, prev_start = nil, 0
for i = 1, #data, 5 do
local delta_line = data[i]
prev_line = ((prev_line and (prev_line + delta_line)) or delta_line)
local delta_start = data[(i + 1)]
prev_start = (((delta_line == 0) and (prev_start + delta_start)) or delta_start)
local token_type = token_types[(data[(i + 3)] + 1)]
vim.api.nvim_buf_add_highlight(bufnr, ns, ("LspSemantic_" .. token_type), prev_line, prev_start, (prev_start + data[(i + 2)]))
end
return nil
end
lsp.idris2_lsp.setup({on_attach = refresh_semantic_highlighting, autostart = true, handlers = {["workspace/semanticTokens/refresh"] = refresh_semantic_highlighting, ["textDocument/semanticTokens/full"] = _14_}})
vim.cmd("highlight link LspSemantic_type Include")
vim.cmd("highlight link LspSemantic_function Identifier")
vim.cmd("highlight link LspSemantic_struct Number")
vim.cmd("highlight LspSemantic_variable guifg=gray")
vim.cmd("highlight link LspSemantic_keyword Structure")
vim.opt.signcolumn = "yes"
local function cleanup_markdown(contents)
if (contents.kind == "markdown") then
contents["value"] = string.gsub(contents.value, "%[([^%]]+)%]%(([^%)]+)%)", "[%1]")
else
end
return contents
end
local previous_handler = vim.lsp.handlers["textDocument/hover"]
local function _16_(a0, result, b, c)
if not (result and result.contents) then
return previous_handler(a0, result, b, c)
else
local new_contents = cleanup_markdown(result.contents)
result["contents"] = new_contents
return previous_handler(a0, result, b, c)
end
end
vim.lsp.handlers["textDocument/hover"] = _16_
return nil
end
local function _18_()
return require("mason").setup()
end
return {utils.plugin("williamboman/mason.nvim", {config = _18_}), utils.plugin("williamboman/mason-lspconfig.nvim", {config = {ensure_installed = {"rust_analyzer"}}}), utils.plugin("neovim/nvim-lspconfig", {event = "VeryLazy", lazy = true, config = setup})}

View file

@ -0,0 +1,182 @@
-- [nfnl] Compiled from fnl/dots/plugins/ltex-ls.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local utils = _local_1_["utils"]
local lsp = autoload("lspconfig")
local configs = autoload("lspconfig/configs")
local lsputil = autoload("lspconfig/util")
local function cmds(xs)
local tbl_21_auto = {}
local i_22_auto = 0
for _, x in ipairs(xs) do
local val_23_auto = ("\\" .. x .. "{}")
if (nil ~= val_23_auto) then
i_22_auto = (i_22_auto + 1)
tbl_21_auto[i_22_auto] = val_23_auto
else
end
end
return tbl_21_auto
end
local latex_command_settings = {dummy = cmds({"texttt", "scripture", "lstref", "figref", "tblref", "secref", "personaltextcite", "personalparencite", "textcite", "parencite", "parencite[]", "game", "acsu", "enquote", "name", "item", "reqref", "gamebtn", "fs", "cs", "appref", "sorty"}), ignore = cmds({"urlfootnote", "caption", "todo"})}
local Dictionary_file = {["de-DE"] = {(vim.fn.getenv("HOME") .. "/.config/ltex-ls/dictionary.txt")}}
local Disabled_rules_file = {["de-DE"] = {(vim.fn.getenv("HOME") .. "/.config/ltex-ls/disable.txt")}}
local False_positives_file = {["de-DE"] = {(vim.fn.getenv("HOME") .. "/.config/ltex-ls/false.txt")}}
local latex_command_settings_formatted
do
local tbl = {}
for option, commands in pairs(latex_command_settings) do
for _, command in ipairs(commands) do
tbl[command] = option
end
end
latex_command_settings_formatted = tbl
end
local function read_files(files)
local dict = {}
for _, file in ipairs(files) do
local f = io.open(file, "r")
if (nil ~= f) then
for l in f:lines() do
table.insert(dict, l)
end
else
end
end
return dict
end
local function find_ltex_lang()
local buf_clients = vim.lsp.buf_get_clients()
for _, client in ipairs(buf_clients) do
if (client.name == "ltex") then
local ___antifnl_rtn_1___ = client.config.settings.ltex.language
return ___antifnl_rtn_1___
else
end
end
return nil
end
local function find_ltex_files(filetype, value)
if (filetype == "dictionary") then
return Dictionary_file[(value or find_ltex_lang())]
elseif (filetype == "disable") then
return Disabled_rules_file[(value or find_ltex_lang())]
elseif (filetype == "falsePositive") then
return False_positives_file[(value or find_ltex_lang())]
else
return nil
end
end
local function update_config(lang, configtype)
local buf_clients = vim.lsp.buf_get_clients()
local client = nil
for _, lsp0 in ipairs(buf_clients) do
if (lsp0.name == "ltex") then
client = lsp0
else
end
end
if client then
if (configtype == "dictionary") then
if client.config.settings.ltex.dictionary then
client.config.settings.ltex.dictionary = {[lang] = read_files(Dictionary_file[lang])}
return client.notify("workspace/didChangeConfiguration", client.config.settings)
else
return vim.notify("Error when reading dictionary config, check it")
end
elseif (configtype == "disable") then
if client.config.settings.ltex.disabledRules then
client.config.settings.ltex.disabledRules = {[lang] = read_files(Disabled_rules_file[lang])}
return client.notify("workspace/didChangeConfiguration", client.config.settings)
else
return vim.notify("Error when reading disabledRules config, check it")
end
elseif (configtype == "falsePositive") then
if client.config.settings.ltex.hiddenFalsePositives then
client.config.settings.ltex.hiddenFalsePositives = {[lang] = read_files(False_positives_file[lang])}
return client.notify("workspace/didChangeConfiguration", client.config.settings)
else
return vim.notify("Error when reading hiddenFalsePositives config, check it")
end
else
return nil
end
else
return nil
end
end
local function add_to_file(filetype, lang, file, value)
file = io.open(file[(#file - 0)], "a+")
if file then
file:write((value .. "\n"))
file:close()
else
local ___antifnl_rtns_1___ = {print("Failed insert %q", value)}
return (table.unpack or _G.unpack)(___antifnl_rtns_1___)
end
if (filetype == "dictionary") then
return update_config(lang, "dictionary")
elseif (filetype == "disable") then
return update_config(lang, "disable")
elseif (filetype == "falsePositive") then
return update_config(lang, "falsePositive")
else
return nil
end
end
local function add_to(filetype, lang, file, value)
local dict = read_files(file)
for _, v in ipairs(dict) do
if (v == value) then
return nil
else
end
end
return add_to_file(filetype, lang, file, value)
end
local function init()
local function _15_(filename)
return lsputil.path.dirname(filename)
end
configs.ltex = {default_config = {cmd = {"ltex-ls"}, filetypes = {"tex", "latex", "bib"}, root_dir = _15_}}
lsp.ltex.setup({settings = {ltex = {enabled = {"latex", "tex", "bib"}, language = "de-DE", checkFrequency = "save", diagnosticSeverity = "information", setenceCacheSize = 5000, additionalRules = {enablePickyRules = true, motherTongue = "de-DE"}, dictionary = utils["map-values"](read_files, Dictionary_file), disabledRules = utils["map-values"](read_files, Disabled_rules_file), hiddenFalsePositives = utils["map-values"](read_files, False_positives_file), latex = {commands = latex_command_settings_formatted}}}})
lsp.ltex.dictionary_file = Dictionary_file
lsp.ltex.disabledrules_file = Disabled_rules_file
lsp.ltex.falsepostivies_file = False_positives_file
local orig_execute_command = vim.lsp.buf.execute_command
local function _16_(command)
if (command.command == "_ltex.addToDictionary") then
local arg = command.arguments[1].words
for lang, words in pairs(arg) do
for _, word in ipairs(words) do
local filetype = "dictionary"
add_to(filetype, lang, find_ltex_files(filetype, lang), word)
end
end
return nil
elseif (command.command == "_ltex.disableRules") then
local arg = command.arguments[1].ruleIds
for lang, rules in pairs(arg) do
for _, rule in ipairs(rules) do
local filetype = "disable"
add_to(filetype, lang, find_ltex_files(filetype, lang), rule)
end
end
return nil
elseif (command.command == "_ltex.hideFalsePositives") then
local arg = command.arguments[1].falsePositives
for lang, rules in pairs(arg) do
for _, rule in ipairs(rules) do
local filetype = "falsePositive"
add_to(filetype, lang, find_ltex_files(filetype, lang), rule)
end
end
return nil
else
return orig_execute_command(command)
end
end
vim.lsp.buf.execute_command = _16_
return nil
end
return {}

View file

@ -0,0 +1,4 @@
-- [nfnl] Compiled from fnl/dots/plugins/noice.fnl by https://github.com/Olical/nfnl, do not edit.
local utils = require("dots.utils")
do local _ = {utils.plugin("folke/noice.nvim", {dependencies = {"MunifTanjim/nui.nvim"}, opts = {presets = {inc_rename = true, long_message_to_split = true, bottom_search = true}, lsp = {override = {["vim.lsp.util.convert_input_to_markdown_lines"] = true, ["vim.lsp.util.stylize_markdown"] = true, ["cmp.entry.get_documentation"] = true}}, views = {cmdline_popup = {border = {style = "none", padding = {1, 1}}, position = {row = 5, col = "50%"}, size = {width = 60, height = "auto"}}, popupmenu = {relative = "editor", border = {style = "none", padding = {1, 1}}, position = {row = 8, col = "50%"}, size = {width = 60, height = 10}}, mini = {max_height = 5}}, cmdline = {view = "cmdline", format = {cmdline = {icon = ":"}, help = false, lua = false}}, messages = {view = "mini", view_error = "cmdline_output", view_warn = "mini", view_search = "virtualtext"}, markdown = {hover = {["|(%S-)|"] = vim.cmd.help}}, routes = {{view = "notify", filter = {event = "msg_showmode"}}, {view = "mini", filter = {error = true, max_height = 5}}, {view = "cmdline_output", filter = {error = true, min_height = 6}}}}})} end
return {}

View file

@ -0,0 +1,9 @@
-- [nfnl] Compiled from fnl/dots/plugins/nvim-colorizer.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local utils = _local_1_["utils"]
local colorizer = autoload("colorizer")
local function _2_()
return colorizer.setup({"*"}, {RGB = true, RRGGBB = true, names = true, RRGGBBAA = true, rgb_fn = true, hsl_fn = true, mode = "background"})
end
return {utils.plugin("norcalli/nvim-colorizer.lua", {event = "VeryLazy", lazy = true, config = _2_})}

View file

@ -0,0 +1,6 @@
-- [nfnl] Compiled from fnl/dots/plugins/obsidian.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local utils = _local_1_["utils"]
local vault_path = (vim.fn.expand("~") .. "/Documents/obsidian-vault")
return {utils.plugin("epwalsh/obsidian.nvim", {lazy = true, version = "*", ft = "markdown", event = {("BufReadPre " .. vault_path .. "/**.md"), ("BufNewFile " .. vault_path .. "/**.md")}, dependencies = {"nvim-lua/plenary.nvim"}, opts = {workspaces = {{name = "Vault", path = vault_path}}, completion = {nvim_cmp = true}}})}

View file

@ -0,0 +1,26 @@
-- [nfnl] Compiled from fnl/dots/plugins/plugins.fnl by https://github.com/Olical/nfnl, do not edit.
local function _1_()
require("lsp_lines").setup()
return vim.diagnostic.config({virtual_lines = false})
end
local function _2_()
require("litee.lib").setup()
return require("litee.gh").setup()
end
local function _3_()
vim.g.code_action_menu_show_details = false
return nil
end
local function _4_()
vim.g.antifennel_executable = "/home/leon/tmp/antifennel/antifennel"
return nil
end
local function _5_()
vim.g.vlime_overlay = "slimv"
return nil
end
local function _6_()
vim.g.rustfmt_fail_silently = 1
return nil
end
return {"Olical/aniseed", "Olical/nfnl", "nvim-lua/plenary.nvim", "norcalli/nvim.lua", "kyazdani42/nvim-web-devicons", "folke/which-key.nvim", {"ckipp01/nvim-jenkinsfile-linter", dependencies = {"nvim-lua/plenary.nvim"}}, "psliwka/vim-smoothie", {"nathanaelkane/vim-indent-guides", cmd = {"IndentGuidesToggle"}}, {"luukvbaal/stabilize.nvim", config = true}, {"stevearc/dressing.nvim", config = true}, {"tweekmonster/startuptime.vim", cmd = {"StartupTime"}}, {"moll/vim-bbye", lazy = true, cmd = {"Bdelete", "Bwipeout"}}, {"petertriho/nvim-scrollbar", event = "VeryLazy", lazy = true, config = true}, {"TimUntersberger/neogit", opts = {integrations = {diffview = true}}, cmd = {"Neogit"}}, {"folke/persistence.nvim", opts = {dir = vim.fn.expand((vim.fn.stdpath("cache") .. "/sessions/"))}}, {"https://git.sr.ht/~whynothugo/lsp_lines.nvim", config = _1_}, "jiangmiao/auto-pairs", "tpope/vim-repeat", {"preservim/nerdcommenter", event = "VeryLazy", lazy = true, priority = 1000}, {"godlygeek/tabular", cmd = {"Tabularize"}}, "tpope/vim-surround", "hauleth/sad.vim", "wellle/targets.vim", {"mg979/vim-visual-multi", lazy = true, event = "VeryLazy"}, "tommcdo/vim-exchange", {"phaazon/hop.nvim", lazy = true, event = "VeryLazy", opts = {keys = "jfkdls;amvieurow"}}, {"rcarriga/nvim-dap-ui", lazy = true, config = true, dependencies = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"}}, {"mfussenegger/nvim-dap", lazy = true}, {"nvim-telescope/telescope-dap.nvim", lazy = true, dependencies = {"nvim-telescope/telescope.nvim", "mfussenegger/nvim-dap"}}, {"ldelossa/gh.nvim", lazy = true, config = _2_, dependencies = {"ldelossa/litee.nvim"}}, {"pwntester/octo.nvim", lazy = true, dependencies = {"nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim", "kyazdani42/nvim-web-devicons"}, config = true}, "ruanyl/vim-gh-line", "rhysd/conflict-marker.vim", {"tpope/vim-fugitive", lazy = true, event = "VeryLazy"}, {"ray-x/lsp_signature.nvim", event = "BufEnter"}, {"weilbith/nvim-code-action-menu", cmd = "CodeActionMenu", config = _3_}, {"dnlhc/glance.nvim", lazy = true, config = true}, {"smjonas/inc-rename.nvim", opts = {input_buffer_type = "dressing"}}, {"monkoose/nvlime", ft = {"lisp"}, dependencies = {"monkoose/parsley"}}, "imsnif/kdl.vim", "tpope/vim-sleuth", "editorconfig/editorconfig-vim", "sbdchd/neoformat", {"elkowar/antifennel-nvim", config = _4_}, {"Olical/conjure", ft = {"fennel"}}, {"eraserhd/parinfer-rust", build = "cargo build --release"}, "kmonad/kmonad-vim", {"elkowar/yuck.vim", ft = {"yuck"}}, {"cespare/vim-toml", ft = {"toml"}}, {"bduggan/vim-raku", ft = {"raku"}}, {"LnL7/vim-nix", ft = {"nix"}}, {"kevinoid/vim-jsonc"}, {"pangloss/vim-javascript", ft = {"javascript"}}, {"ianks/vim-tsx", ft = {"typescript-react"}}, {"leafgarland/typescript-vim", ft = {"typescript", "typescript-react", "javascript"}}, {"HerringtonDarkholme/yats.vim"}, {"mxw/vim-jsx"}, {"purescript-contrib/purescript-vim", ft = {"purescript"}}, {"derekelkins/agda-vim", ft = {"agda"}}, {"neovimhaskell/haskell-vim", ft = {"haskell"}}, {"monkoose/nvlime", ft = {"lisp"}, dependencies = {"monkoose/parsley"}, config = _5_}, {"rust-lang/rust.vim", ft = {"rust"}, dependencies = {"mattn/webapi-vim"}, config = _6_}, {"Saecki/crates.nvim", dependencies = {"nvim-lua/plenary.nvim"}, opts = {enable_update_available_warning = false}}, {"mrcjkb/rustaceanvim", version = "^4", ft = {"rust", "toml"}}, {"qnighy/lalrpop.vim"}, {"edwinb/idris2-vim", ft = {"idris2"}}, {"vmchale/ats-vim", ft = {"ats", "dats", "sats"}}, {"bakpakin/fennel.vim", ft = {"fennel"}}, {"evanleck/vim-svelte"}}

View file

@ -0,0 +1,12 @@
-- [nfnl] Compiled from fnl/dots/plugins/telescope.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local utils = _local_1_["utils"]
local telescope = autoload("telescope")
local actions = autoload("telescope.actions")
local function setup()
telescope.setup({defaults = {mappings = {i = {["<esc>"] = actions.close}}, file_ignore_patterns = {"Cargo.lock", ".*.snap", "docs/theme/.*", "node%_modules/.*", "target/.*"}}, extensions = {["ui-select"] = {require("telescope.themes").get_dropdown()}}})
telescope.load_extension("dap")
return utils.keymap("n", "<C-p>", ":Telescope find_files<CR>")
end
return {utils.plugin("nvim-telescope/telescope.nvim", {config = setup, cmd = {"Telescope"}, dependencies = {"nvim-lua/popup.nvim", "nvim-lua/plenary.nvim"}})}

View file

@ -0,0 +1,3 @@
-- [nfnl] Compiled from fnl/dots/plugins/todo-comments.fnl by https://github.com/Olical/nfnl, do not edit.
local utils = require("dots.utils")
return {utils.plugin("folke/todo-comments.nvim", {lazy = true, event = "VeryLazy", opts = {keywords = {TODO = {icon = "\239\128\140 "}, WARN = {icon = "\239\129\177 ", alt = {"WARNING", "XXX", "!!!"}}, NOTE = {icon = "\239\137\137 ", alt = {"INFO"}}, FIX = {icon = "\239\134\136 ", alt = {"FIXME", "BUG", "FIXIT", "ISSUE", "PHIX"}}, PERF = {icon = "\239\128\151 ", alt = {"OPTIM", "PERFORMANCE", "OPTIMIZE"}}, HACK = {icon = "\239\146\144 "}}}})}

View file

@ -0,0 +1,8 @@
-- [nfnl] Compiled from fnl/dots/plugins/treesitter.fnl by https://github.com/Olical/nfnl, do not edit.
local utils = require("dots.utils")
local function setup()
local configs = require("nvim-treesitter.configs")
vim.g.skip_ts_context_commentstring_module = true
return configs.setup({ensure_installed = {"rust", "fennel", "commonlisp", "vim", "regex", "lua", "bash", "markdown", "markdown_inline"}, highlight = {disable = {"fennel", "rust", "haskell"}, enable = false}, incremental_selection = {keymaps = {init_selection = "gss", node_incremental = "gsl", node_decremental = "gsh", scope_incremental = "gsj", scope_decremental = "gsk"}, enable = false}, textsubjects = {enable = true, disable = {"noice"}, prev_selection = ",", keymaps = {["."] = "textsubjects-smart"}}, playground = {disable = {"fennel"}, updatetime = 25, keybindings = {toggle_query_editor = "o", toggle_hl_groups = "i", toggle_injected_languages = "t", toggle_anonymous_nodes = "a", toggle_language_display = "I", focus_language = "f", unfocus_language = "F", update = "R", goto_node = "<cr>", show_help = "?"}, enable = false, persist_queries = false}})
end
return {}

View file

@ -0,0 +1,17 @@
-- [nfnl] Compiled from fnl/dots/plugins/trouble.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local utils = _local_1_["utils"]
local colors = _local_1_["colors"]
local trouble = autoload("trouble")
local function setup()
trouble.setup({auto_close = true, auto_jump = {"lsp_definitions", "lsp_workspace_diagnostics", "lsp_type_definitions"}, action_keys = {jump = "<CR>", jump_close = "o", close = {"<esc>", "q"}, cancel = "q", preview = "p", toggle_preview = "P", toggle_mode = "m", hover = {"a", "K"}}, auto_open = false, auto_preview = false, icons = false, indent_lines = false, multiline = false})
utils.highlight("TroubleFoldIcon", {bg = "NONE", fg = colors.bright_orange})
utils.highlight("TroubleCount", {bg = "NONE", fg = colors.bright_green})
utils.highlight("TroubleText", {bg = "NONE", fg = colors.light0})
utils.highlight("TroubleSignError", {bg = "NONE", fg = colors.bright_red})
utils.highlight("TroubleSignWarning", {bg = "NONE", fg = colors.bright_yellow})
utils.highlight("TroubleSignInformation", {bg = "NONE", fg = colors.bright_aqua})
return utils.highlight("TroubleSignHint", {bg = "NONE", fg = colors.bright_blue})
end
return {utils.plugin("folke/trouble.nvim", {lazy = true, config = setup, cmd = {"Trouble", "TroubleClose", "TroubleRefresh", "TroubleToggle"}})}

View file

@ -0,0 +1,15 @@
-- [nfnl] Compiled from fnl/dots/plugins/vimtex.fnl by https://github.com/Olical/nfnl, do not edit.
local utils = require("dots.utils")
local function setup()
vim.g.vimtex_view_method = "general"
vim.g.vimtex_view_general_viewer = "zathura"
vim.g.vimtex_view_general_options = "--synctex-forward @line:1:@tex @pdf"
vim.g.vimtex_quickfix_method = "pplatex"
vim.g.vimtex_quickfix_mode = 2
vim.g.vimtex_quickfix_open_on_warning = 0
vim.g.vimtex_compiler_latexmk = {build_dir = "", callback = 1, continuous = 1, executable = "latexmk", hooks = {}, options = {"-verbose", "-file-line-error", "-synctex=1", "-interaction=nonstopmode", "-shell-escape"}}
vim.g.vimtex_syntax_custom_cmds = {{name = "scripture", argstyle = "ital"}}
vim.g.vimtex_syntax_conceal = {accents = 1, cites = 1, fancy = 1, greek = 1, math_bounds = 1, math_delimiters = 1, math_fracs = 1, math_super_sub = 1, math_symbols = 1, sections = 0, styles = 0}
return nil
end
return {utils.plugin("lervag/vimtex", {ft = {"latex", "tex"}, config = setup})}

View file

@ -0,0 +1,4 @@
-- [nfnl] Compiled from fnl/dots/prelude.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("nfnl.module")
local autoload = _local_1_["autoload"]
return {autoload = autoload, a = autoload("nfnl.core"), str = autoload("nfnl.string"), utils = autoload("dots.utils"), colors = autoload("dots.colors")}

View file

@ -0,0 +1,35 @@
-- [nfnl] Compiled from fnl/dots/smart-compe-conjure.fnl by https://github.com/Olical/nfnl, do not edit.
al(utils, dots.utils)
al(a, aniseed.core)
al(str, aniseed.string)
al(view, aniseed.view)
al(popup, popup)
al(compe, compe)
local function _1_()
return setmetatable({}, {__index = my_source})
end
my_source.new = _1_
my_source.determine = fuck.determine
my_source.get_metadata = fuck.get_metadata
my_source.complete = fuck.complete
my_source.abort = fuck.abort
local function _2_(self, args)
a.println(view.serialise(args))
local function _3_()
local help_tag = help["find-help-tag-for"](args.completed_item.word)
if help_tag then
local lines = {"```help"}
for _, line in ipairs(help["help-for-tag"](help_tag)) do
table.insert(lines, line)
end
table.insert(lines, "```")
return lines
else
return nil
end
end
return args.callback(_3_())
end
my_source.documentation = _2_
defn(setup, {}, def(fuck, require("compe_conjure")), def(my_source, {}), nil, nil, nil, nil, nil, nil, compe.register_source("epic", my_source.new()), compe.setup({enabled = true, min_length = 1, preselect = "enable", throttle_time = 80, source_timeout = 200, incomplete_delay = 400, max_abbr_width = 100, max_kind_width = 100, max_menu_width = 100, documentation = true, source = {path = true, buffer = true, calc = true, nvim_lsp = true, nvim_lua = true, epic = true, vsnip = false}, debug = false, autocomplete = false}))
return {}

View file

@ -0,0 +1,203 @@
-- [nfnl] Compiled from fnl/dots/utils.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("dots.prelude")
local autoload = _local_1_["autoload"]
local a = _local_1_["a"]
local str = _local_1_["str"]
local function plugin(name, _3fopts)
if (nil == _3fopts) then
return name
else
_3fopts[1] = name
return _3fopts
end
end
local function prepend(a0, list)
local x = list
table.insert(x, 1, a0)
return x
end
local function all(f)
local function _3_(_241)
return not f(_241)
end
return not a.some(_3_)
end
local function single_to_list(x)
if a["table?"](x) then
return x
else
return {x}
end
end
local function contains_3f(list, elem)
local function _5_(_241)
return (elem == _241)
end
do local _ = a.some(_5_, list) end
return false
end
local function filter_table(f, t)
local tbl_16_auto = {}
for k, v in pairs(t) do
local k_17_auto, v_18_auto = nil, nil
if f(k, v) then
k_17_auto, v_18_auto = k, v
else
k_17_auto, v_18_auto = nil
end
if ((k_17_auto ~= nil) and (v_18_auto ~= nil)) then
tbl_16_auto[k_17_auto] = v_18_auto
else
end
end
return tbl_16_auto
end
local function split_last(s, sep)
for i = #s, 1, -1 do
local c = s:sub(i, i)
if (sep == c) then
local left = s:sub(1, (i - 1))
local right = s:sub((i + 1))
return { left, right }
else
end
end
return {s}
end
local function find_where(pred, xs)
for _, x in ipairs(xs) do
if pred(x) then
return x
else
end
end
return nil
end
local function find_map(f, xs)
for _, x in ipairs(xs) do
local res = f(x)
if (nil ~= res) then
return res
else
end
end
return nil
end
local function keep_if(f, x)
if f(x) then
return x
else
return nil
end
end
local function map_values(f, t)
local tbl = {}
for k, v in pairs(t) do
tbl[k] = f(v)
end
return tbl
end
local function without_keys(keys, t)
local function _12_(_241)
return not contains_3f(keys, _241)
end
return filter_table(_12_, t)
end
local function keymap(modes, from, to, _3fopts)
local full_opts = without_keys({"buffer"}, a.merge({noremap = true, silent = true}, (_3fopts or {})))
for _, mode in ipairs(single_to_list(modes)) do
local keymap_opts
local _13_
if (nil ~= _3fopts) then
_13_ = _3fopts.buffer
else
_13_ = nil
end
if _13_ then
keymap_opts = a.assoc(full_opts, "buffer", 0)
else
keymap_opts = full_opts
end
vim.keymap.set(mode, from, to, keymap_opts)
end
return nil
end
local function del_keymap(mode, from, _3fbuf_local)
local function _16_()
if _3fbuf_local then
return {buffer = 0}
else
return {}
end
end
return vim.keymap.del(mode, from, _16_())
end
local function buffer_content(bufnr)
return vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
end
local function surround_if_present(a0, mid, b)
if mid then
return (a0 .. mid .. b)
else
return ""
end
end
local function highlight(group_arg, colset)
local default = {fg = "NONE", bg = "NONE", gui = "NONE"}
local opts = a.merge(default, colset)
for _, group in ipairs(single_to_list(group_arg)) do
vim.cmd(("hi! " .. group .. " guifg='" .. opts.fg .. "' guibg='" .. opts.bg .. "' gui='" .. opts.gui .. "'"))
end
return nil
end
local function highlight_add(group_arg, colset)
for _, group in ipairs(single_to_list(group_arg)) do
vim.cmd(("hi! " .. group .. surround_if_present(" guibg='", colset.bg, "'") .. surround_if_present(" guifg='", colset.fg, "'") .. surround_if_present(" gui='", colset.gui, "'")))
end
return nil
end
local function shorten_path(path, seg_length, shorten_after)
local segments = str.split(path, "/")
if ((shorten_after > #path) or (2 > #segments)) then
return path
else
local init = a.butlast(segments)
local filename = a.last(segments)
local shortened_segs
local function _18_(_241)
return string.sub(_241, 1, seg_length)
end
shortened_segs = a.map(_18_, init)
return (str.join("/", shortened_segs) .. "/" .. filename)
end
end
local function comp(f, g)
local function _20_(...)
return f(g(...))
end
return _20_
end
local function get_selection()
local _let_21_ = vim.fn.getpos("'<")
local _ = _let_21_[1]
local s_start_line = _let_21_[2]
local s_start_col = _let_21_[3]
local _let_22_ = vim.fn.getpos("'>")
local _0 = _let_22_[1]
local s_end_line = _let_22_[2]
local s_end_col = _let_22_[3]
local n_lines = (1 + math.abs((s_end_line - s_start_line)))
local lines = vim.api.nvim_buf_get_lines(0, (s_start_line - 1), s_end_line, false)
if (nil == lines[1]) then
return s_start_line, s_end_line, lines
else
lines[1] = string.sub(lines[1], s_start_col, -1)
if (1 == n_lines) then
lines[n_lines] = string.sub(lines[n_lines], 1, (1 + (s_end_col - s_start_col)))
else
lines[n_lines] = string.sub(lines[n_lines], 1, s_end_col)
end
return s_start_line, s_end_line, lines
end
end
return {plugin = plugin, all = all, ["single-to-list"] = single_to_list, ["contains?"] = contains_3f, ["filter-table"] = filter_table, ["split-last"] = split_last, ["find-where"] = find_where, ["find-map"] = find_map, ["keep-if"] = keep_if, ["map-values"] = map_values, ["without-keys"] = without_keys, keymap = keymap, ["del-keymap"] = del_keymap, ["buffer-content"] = buffer_content, ["surround-if-present"] = surround_if_present, highlight = highlight, ["highlight-add"] = highlight_add, ["shorten-path"] = shorten_path, prepend = prepend, comp = comp, ["get-selection"] = get_selection}

View file

@ -0,0 +1,103 @@
-- [nfnl] Compiled from fnl/main.fnl by https://github.com/Olical/nfnl, do not edit.
local _local_1_ = require("nfnl.module")
local autoload = _local_1_["autoload"]
local a = autoload("nfnl.core")
local str = autoload("nfnl.string")
local utils = autoload("dots.utils")
local lazy = require("lazy")
if vim.fn.has("termguicolors") then
vim.opt.termguicolors = true
else
end
vim.cmd("let mapleader=\"\\<Space>\"")
vim.cmd("let maplocalleader=\",\"")
lazy.setup({import = "dots.plugins", install = {colorscheme = "gruvbox8"}})
require("dots.keybinds")
do
local added_paths = {}
vim.opt.runtimepath = (vim.o.runtimepath .. str.join(",", added_paths))
end
vim.cmd("filetype plugin indent on")
vim.cmd("syntax on")
vim.opt.foldmethod = "marker"
vim.opt.scrolloff = 5
vim.opt.showmode = false
vim.opt.undodir = (vim.env.HOME .. "/.vim/undo-dir")
vim.opt.undofile = true
vim.opt.shortmess = (vim.o.shortmess .. "c")
vim.opt.hidden = true
vim.opt.encoding = "utf-8"
vim.opt.number = false
vim.opt.relativenumber = false
vim.opt.compatible = false
vim.opt.cursorline = true
vim.opt.incsearch = true
vim.opt.hlsearch = true
vim.opt.inccommand = "nosplit"
vim.opt.signcolumn = "yes"
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.backspace = "indent,eol,start"
vim.opt.autoindent = true
vim.opt.smartindent = true
vim.opt.expandtab = true
vim.opt.wrap = false
vim.opt.completeopt = "menuone,noselect"
vim.opt.laststatus = 2
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.mouse = "a"
vim.opt.shell = "bash"
vim.opt.background = "dark"
vim.opt.swapfile = false
vim.opt.undolevels = 10000
vim.opt.keywordprg = "rusty-man"
vim.g.AutoPairsMultilineClose = 0
vim.cmd("let &t_ut=\"\"")
vim.opt.title = true
vim.opt.titlelen = 0
vim.opt.titlestring = "%{expand(\"%:p\")} [%{mode()}]"
local function _3_()
vim.opt.shiftwidth = 2
return nil
end
vim.api.nvim_create_autocmd("BufWritePost", {pattern = "*.hs", callback = _3_})
local function _4_()
vim.opt_local.foldmethod = "marker"
return nil
end
vim.api.nvim_create_autocmd("FileType", {pattern = "vim", callback = _4_})
local function _5_()
vim.opt_local.formatoptions = vim.o.formatoptions:gsub("[cor]", "")
return nil
end
vim.api.nvim_create_autocmd("FileType", {pattern = "*", callback = _5_})
local function _6_()
return vim.cmd("nnoremap <buffer> <CR> <CR>:cclose<CR>")
end
vim.api.nvim_create_autocmd("FileType", {pattern = "qf", callback = _6_})
local function _7_()
return vim.highlight.on_yank({higroup = "IncSearch", timeout = 300})
end
vim.api.nvim_create_autocmd("TextYankPost", {pattern = "*", callback = _7_})
vim.g.copilot_filetypes = {TelescopePrompt = false}
vim.diagnostic.config({float = {border = "single", style = "minimal"}})
vim.g.VM_leader = "m"
vim.g.rust_clip_command = "xclip -selection clipboard"
vim.g["conjure#client#fennel#aniseed#aniseed_module_prefix"] = "aniseed."
vim.g.vim_parinfer_filetypes = {"carp", "fennel", "clojure"}
vim.g.parinfer_additional_filetypes = {"yuck"}
_G.clean_no_name_empty_buffers = function()
local bufs
local function _8_(_241)
return (a["empty?"](vim.fn.bufname(_241)) and (vim.fn.bufwinnr(_241) < 0) and vim.api.nvim_buf_is_loaded(_241) and ("" == str.join(utils["buffer-content"](_241))) and vim.api.nvim_buf_get_option(_241, "buflisted"))
end
bufs = a.filter(_8_, vim.fn.range(1, vim.fn.bufnr("$")))
if not a["empty?"](bufs) then
return vim.cmd(("bdelete " .. str.join(" ", bufs)))
else
return nil
end
end
vim.cmd("autocmd! BufCreate * :call v:lua.clean_no_name_empty_buffers()")
return vim.cmd("command! -nargs=1 L :lua print(vim.inspect(<args>))")

View file

@ -0,0 +1,272 @@
"$schema" = 'https://starship.rs/config-schema.json'
add_newline = false
format = """
$character$username $directory\
$git_branch\
$git_state\
$git_status\
$package\
$python\
\nλ """
right_format = """$jobs$status$cmd_duration"""
palette = "gruvbox"
[palettes.gruvbox]
cyan = "#689d6a"
green = "#98971a"
blue = "#458588"
red = "#cc241d"
yellow = "#d79921"
purple = "#b16286"
orange = "#d65d0e"
bright-cyan = "#8ec07c"
bright-green = "#b8bb26"
bright-blue = "#83a598"
bright-red = "#fb4934"
bright-yellow = "#fabd2f"
bright-purple = "#d3869b"
bright-orange = "#fe8019"
[username]
style_user = "bright-cyan"
format = " [$user]($style) in"
[directory]
truncate_to_repo = false
truncation_symbol = ''
format='[$path](bright-green) '
[python]
format = '\[[${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
[git_branch]
ignore_branches = ["main", "master"]
format = '\([$branch](bright-cyan)\) '
[git_state]
rebase="REBASING"
format = '\([$state( $progress_current/$progress_total)]($style)\) '
[git_status]
format = '([\[$all_status$ahead_behind\]]($style))'
style = "bright-blue"
[package]
format = '\[[$symbol$version]($style)\]'
disabled = true
[cmd_duration]
format = ' [$duration]($style)'
#[git_metrics]
#disabled = false
#format = '([+$added]($added_style) )([-$deleted]($deleted_style) )'
[character]
format = "$symbol"
success_symbol = "─"
error_symbol = "─"
vimcmd_symbol = "N"
vimcmd_replace_symbol = "R"
vimcmd_visual_symbol = "V"
[status]
disabled = false
format = ' [$symbol $status]($style)'
style = "red"
symbol = 'REEEEEEE'
[aws]
format = '\[[($profile)(\($region\))(\[$duration\])]($style)\]'
[bun]
format = '\[[$symbol($version)]($style)\]'
[c]
format = '\[[$symbol($version(-$name))]($style)\]'
[cmake]
format = '\[[$symbol($version)]($style)\]'
[cobol]
format = '\[[$symbol($version)]($style)\]'
[conda]
format = '\[[$symbol$environment]($style)\]'
[crystal]
format = '\[[$symbol($version)]($style)\]'
[daml]
format = '\[[$symbol($version)]($style)\]'
[dart]
format = '\[[$symbol($version)]($style)\]'
[deno]
format = '\[[$symbol($version)]($style)\]'
[docker_context]
format = '\[[$symbol$context]($style)\]'
[dotnet]
format = '\[[$symbol($version)(🎯 $tfm)]($style)\]'
[elixir]
format = '\[[$symbol($version \(OTP $otp_version\))]($style)\]'
[elm]
format = '\[[$symbol($version)]($style)\]'
[erlang]
format = '\[[$symbol($version)]($style)\]'
[fennel]
format = '\[[$symbol($version)]($style)\]'
[fossil_branch]
format = '\[[$symbol$branch]($style)\]'
[gcloud]
format = '\[[$symbol$account(@$domain)(\($region\))]($style)\]'
[golang]
format = '\[[$symbol($version)]($style)\]'
[gradle]
format = '\[[$symbol($version)]($style)\]'
[guix_shell]
format = '\[[$symbol]($style)\]'
[haskell]
format = '\[[$symbol($version)]($style)\]'
[haxe]
format = '\[[$symbol($version)]($style)\]'
[helm]
format = '\[[$symbol($version)]($style)\]'
[hg_branch]
format = '\[[$symbol$branch]($style)\]'
[java]
format = '\[[$symbol($version)]($style)\]'
[julia]
format = '\[[$symbol($version)]($style)\]'
[kotlin]
format = '\[[$symbol($version)]($style)\]'
[kubernetes]
format = '\[[$symbol$context( \($namespace\))]($style)\]'
[lua]
format = '\[[$symbol($version)]($style)\]'
[memory_usage]
format = '\[$symbol[$ram( | $swap)]($style)\]'
[meson]
format = '\[[$symbol$project]($style)\]'
[nim]
format = '\[[$symbol($version)]($style)\]'
[nix_shell]
format = '\[[$symbol$state( \($name\))]($style)\]'
[nodejs]
format = '\[[$symbol($version)]($style)\]'
[ocaml]
format = '\[[$symbol($version)(\($switch_indicator$switch_name\))]($style)\]'
[opa]
format = '\[[$symbol($version)]($style)\]'
[openstack]
format = '\[[$symbol$cloud(\($project\))]($style)\]'
[os]
format = '\[[$symbol]($style)\]'
[perl]
format = '\[[$symbol($version)]($style)\]'
[php]
format = '\[[$symbol($version)]($style)\]'
[pijul_channel]
format = '\[[$symbol$channel]($style)\]'
[pulumi]
format = '\[[$symbol$stack]($style)\]'
[purescript]
format = '\[[$symbol($version)]($style)\]'
[raku]
format = '\[[$symbol($version-$vm_version)]($style)\]'
[red]
format = '\[[$symbol($version)]($style)\]'
[ruby]
format = '\[[$symbol($version)]($style)\]'
[rust]
format = '\[[$symbol($version)]($style)\]'
[scala]
format = '\[[$symbol($version)]($style)\]'
[spack]
format = '\[[$symbol$environment]($style)\]'
[sudo]
format = '\[[as $symbol]($style)\]'
[swift]
format = '\[[$symbol($version)]($style)\]'
[terraform]
format = '\[[$symbol$workspace]($style)\]'
[time]
format = '\[[$time]($style)\]'
[vagrant]
format = '\[[$symbol($version)]($style)\]'
[vlang]
format = '\[[$symbol($version)]($style)\]'
[zig]
format = '\[[$symbol($version)]($style)\]'
[solidity]
format = '\[[$symbol($version)]($style)\]'

7
eggs/zed/.config/zed/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
conversations
languages
prettier
node
node_modules
.tmp*

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,28 @@
/*!
* buildToken
* Builds OAuth token prefix (helper function)
*
* @name buildToken
* @function
* @param {GitUrl} obj The parsed Git url object.
* @return {String} token prefix
*/
/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
/** @preserve
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/
/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1 @@
../../../dots-of-war/zed/.config/zed/embeddings/stable

View file

@ -0,0 +1,57 @@
{
"extensions": {
"toml": {
"manifest": {
"id": "toml",
"name": "TOML",
"version": "0.1.0",
"schema_version": 1,
"description": "TOML support.",
"repository": "https://github.com/zed-industries/zed",
"authors": [
"Max Brunsfeld <max@zed.dev>",
"Ammar Arif <evergreenkary@gmail.com>"
],
"lib": {
"kind": "Rust",
"version": "0.0.6"
},
"themes": [],
"languages": [
"languages/toml"
],
"grammars": {
"toml": {
"repository": "https://github.com/tree-sitter/tree-sitter-toml",
"rev": "342d9be207c2dba869b9967124c679b5e6fd0ebe",
"path": null
}
},
"language_servers": {
"taplo": {
"language": "TOML",
"languages": [],
"language_ids": {},
"code_action_kinds": null
}
}
},
"dev": false
}
},
"themes": {},
"languages": {
"TOML": {
"extension": "toml",
"path": "languages/toml",
"matcher": {
"path_suffixes": [
"Cargo.lock",
"toml"
],
"first_line_pattern": null
},
"grammar": "toml"
}
}
}

View file

@ -0,0 +1,23 @@
id = "toml"
name = "TOML"
version = "0.1.0"
schema_version = 1
description = "TOML support."
repository = "https://github.com/zed-industries/zed"
authors = ["Max Brunsfeld <max@zed.dev>", "Ammar Arif <evergreenkary@gmail.com>"]
themes = []
languages = ["languages/toml"]
[lib]
kind = "Rust"
version = "0.0.6"
[grammars.toml]
repository = "https://github.com/tree-sitter/tree-sitter-toml"
rev = "342d9be207c2dba869b9967124c679b5e6fd0ebe"
[language_servers.taplo]
language = "TOML"
languages = []
[language_servers.taplo.language_ids]

View file

@ -0,0 +1,6 @@
{
"extensions": {},
"grammars": {},
"languages": {},
"themes": {}
}

Binary file not shown.

View file

@ -0,0 +1,183 @@
[
{
"context": "Pane",
"bindings": {
// unbind closing the tab with this
"ctrl-w": null,
"ctrl-w ctrl-h": ["workspace::ActivatePaneInDirection", "Left"],
"ctrl-w ctrl-j": ["workspace::ActivatePaneInDirection", "Down"],
"ctrl-w ctrl-k": ["workspace::ActivatePaneInDirection", "Up"],
"ctrl-w ctrl-l": ["workspace::ActivatePaneInDirection", "Right"],
"ctrl-shift-t": "pane::ReopenClosedItem",
"ctrl-o": "pane::GoBack",
"ctrl-i": "pane::GoForward"
// "shift-escape": null
}
},
{
"context": "EmptyPane",
"bindings": {
":": "command_palette::Toggle",
"space p": "file_finder::Toggle"
}
},
{
"context": "os == macos && Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"cmd-d": "editor::SelectNext"
}
},
{
"bindings": {
"ctrl-alt-shift-p": "projects::OpenRecent",
"ctrl-alt-shift-o": "workspace::Open"
}
},
{
"context": "os == linux && Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"ctrl-shift-d": "editor::SelectNext"
}
},
{
"context": "EmptyPane || Editor && VimControl && !VimWaiting && !menu",
"bindings": {
"space b c": "pane::CloseActiveItem",
":": "command_palette::Toggle",
"space p": "file_finder::Toggle",
"space o": "pane::DeploySearch",
"space h": "pane::ActivatePrevItem",
"space l": "pane::ActivateNextItem",
"space c space": "editor::ToggleComments",
// go to search result
"g space": "editor::OpenExcerpts",
"space e j": "editor::ExpandExcerptsDown",
"space e k": "editor::ExpandExcerptsUp",
// multi-cursor
"cmd-shift-d": "editor::SelectPrevious",
"cmd-shift-l": "editor::SelectAllMatches",
"ctrl-j": "editor::AddSelectionBelow",
"ctrl-k": "editor::AddSelectionAbove",
"alt-d": "editor::SelectNext",
"alt-j": "editor::SelectAllMatches",
// lsp
"space m f": "editor::Format",
"space m /": "project_symbols::Toggle",
"space m g": "editor::GoToDefinition",
"space m d": "editor::Hover",
"space m n": "editor::Rename",
"space m r": "editor::FindAllReferences",
"space m t": "editor::GoToTypeDefinition",
"space m e": "editor::GoToDiagnostic",
"space m E": "editor::GoToPrevDiagnostic",
"space m v": "editor::ToggleCodeActions",
"space m o": "outline::Toggle",
// diagnostics
"space e e": "diagnostics::Deploy",
"space e w": "diagnostics::ToggleWarnings",
// view
"space v n": "editor::ToggleLineNumbers",
"space v i": "editor::ToggleInlayHints",
// Git
"space g b": "editor::ToggleGitBlame"
}
},
{
"context": "Editor && vim_mode == normal && !VimWaiting && !menu",
"bindings": {}
},
{
"context": "Editor && vim_mode == insert",
"bindings": {
"ctrl-w": "editor::DeleteToPreviousWordStart"
}
},
{
"context": "os == linux && ((Editor && vim_mode == normal) || Terminal) && !VimWaiting && !menu",
"bindings": {
"ctrl-t ctrl-t": "terminal_panel::ToggleFocus",
"ctrl-t ctrl-n": "workspace::NewTerminal",
"ctrl-t ctrl-shift-n": "workspace::NewCenterTerminal",
"ctrl-t ctrl-h": "pane::ActivatePrevItem",
"ctrl-t ctrl-l": "pane::ActivateNextItem",
"ctrl-x ctrl-c": "pane::CloseActiveItem",
"alt-j": "workspace::ToggleBottomDock"
}
},
{
"context": "os == macos && ((Editor && vim_mode == normal) || Terminal) && !VimWaiting && !menu",
"bindings": {
"cmd-t cmd-t": "terminal_panel::ToggleFocus",
"cmd-t cmd-n": "workspace::NewTerminal",
"cmd-t cmd-shift-n": "workspace::NewCenterTerminal",
"cmd-t cmd-h": "pane::ActivatePrevItem",
"cmd-t cmd-l": "pane::ActivateNextItem",
"cmd-x cmd-c": "pane::CloseActiveItem"
}
},
{
"context": "os == linux && ((Editor && vim_mode == normal) || Terminal) && !VimWaiting && !menu",
"bindings": {
"alt-j": "workspace::ToggleBottomDock",
"alt-t alt-t": "terminal_panel::ToggleFocus",
"alt-t alt-n": "workspace::NewTerminal",
"alt-t alt-shift-n": "workspace::NewCenterTerminal",
"alt-t alt-h": "pane::ActivatePrevItem",
"alt-t alt-l": "pane::ActivateNextItem",
"alt-x alt-c": "pane::CloseActiveItem"
}
},
{
"context": "Editor && vim_mode == visual && !VimWaiting && !menu",
"bindings": {
"n": "editor::SelectLargerSyntaxNode",
"N": "editor::SelectSmallerSyntaxNode",
"m": "vim::SelectNext",
"M": "vim::SelectPrevious",
",": "editor::SplitSelectionIntoLines"
}
},
{
"context": "ProjectSearchBar",
"bindings": {
"space b c": "pane::CloseActiveItem",
"escape escape": "pane::CloseActiveItem"
}
},
// Panel stuff
{
"context": "Editor && VimControl && !VimWaiting && !menu || OutlinePanel || ProjectPanel || Assistant || EmptyPane",
"bindings": {
"space v h": "workspace::ToggleLeftDock",
"space v l": "workspace::ToggleRightDock",
"space v o": "outline_panel::ToggleFocus",
"space v p": "project_panel::ToggleFocus",
"space v a": "assistant::ToggleFocus"
}
},
{
"context": "OutlinePanel",
"bindings": {
"space l": "outline_panel::ToggleFocus"
}
},
{
"context": "ProjectPanel",
"bindings": {
"space l": "project_panel::ToggleFocus"
}
},
{
"context": "Assistant",
"bindings": {
"space h": "assistant::ToggleFocus"
}
}
]

View file

@ -0,0 +1,51 @@
{
"assistant": {
"default_model": {
"provider": "anthropic",
"model": "claude-3-sonnet-latest"
},
"version": "2"
},
"language_models": {
"openai": {
"version": "1"
}
},
"theme": "Gruvbox Dark Hard",
"buffer_font_size": 14,
"buffer_font_family": "FiraCode Nerd Font",
//"buffer_font_family": "JetBrainsMono Nerd Font Mono",
// "buffer_line_height": { "custom": 1.55 },
// "ui_font_family": "Noto Sans",
// "buffer_font_family": "Zed Mono",
// "active_pane_magnification": 1.3,
"tab_bar": {
"show_nav_history_buttons": false
},
"calls": {
"mute_on_join": true
},
"gutter": {
"line_numbers": false,
"folds": false
},
"vertical_scroll_margin": 5,
"tabs": { "git_status": true },
"terminal": {
"font_family": "JetBrainsMono Nerd Font Mono",
"font_size": 14
},
"vim_mode": true,
"vim": {
"use_smartcase_find": true,
"use_system_clipboard": "on_yank"
},
"languages": {
"JSON": {
"format_on_save": "off"
}
}
}

View file

@ -0,0 +1,19 @@
// Static tasks configuration.
[
{
"label": "Cargo test",
"command": "cargo nextest run",
"env": {},
//"cwd": "/path/to/working/directory",
"use_new_terminal": false,
"allow_concurrent_runs": false
},
{
"label": "Cargo run",
"command": "cargo run",
"env": {},
//"cwd": "/path/to/working/directory",
"use_new_terminal": false,
"allow_concurrent_runs": false
}
]

4
eggs/zsh/.config/zsh/.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
.zcompdump
.zcompcache
*.zwc
.zsh_sessions

View file

@ -0,0 +1,14 @@
# Function to determine the need of a zcompile. If the .zwc file
# does not exist, or the base file is newer, we need to compile.
# These jobs are asynchronous, and will not impact the interactive shell
zcompare() {
if [[ -s ${1} && ( ! -s ${1}.zwc || ${1} -nt ${1}.zwc) ]]; then
zcompile ${1}
fi
}
emulate zsh -o extended_glob -c "local files=($ZDOTDIR/*.zsh)"
for file in "${files[@]}"; do
zcompare $file
done
zcompare .zshrc

View file

@ -0,0 +1,4 @@
[ -f $HOME/.profile ] && . $HOME/.profile
# Added by OrbStack: command-line tools and integration
source ~/.orbstack/shell/init.zsh 2>/dev/null || :

166
eggs/zsh/.config/zsh/.zshrc Normal file
View file

@ -0,0 +1,166 @@
# history config
HISTSIZE=50000
SAVEHIST=50000
HISTFILE="$HOME/.cache/zsh/history"
setopt HIST_SAVE_NO_DUPS
setopt HIST_IGNORE_ALL_DUPS
#setopt INC_APPEND_HISTORY
setopt EXTENDED_HISTORY
setopt SHARE_HISTORY
source "$ZDOTDIR/utils.zsh"
### Added by Zinit's installer
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
print -P "%F{33} %F{34}Installation successful.%f%b" || \
print -P "%F{160} The clone has failed.%f%b"
fi
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode for \
zdharma-continuum/zinit-annex-as-monitor \
zdharma-continuum/zinit-annex-bin-gem-node \
zdharma-continuum/zinit-annex-patch-dl \
zdharma-continuum/zinit-annex-rust
### End of Zinit's installer chunk
# some magic to run compinit stuff only once a day, which should speed up zsh startup a good bit
autoload -Uz compinit
for dump in $ZSHDOTDIR/.zcompdump(N.mh+24); do
compinit
done
compinit -C
# this would be the regular version of the above compinit code:
# compinit must be ran before fzf-tab, but fzf-tab must be before syntax highlighting etc
#autoload -Uz compinit
#compinit
zinit light "Aloxaf/fzf-tab"
zinit wait lucid for \
"zsh-users/zsh-history-substring-search" \
"zdharma-continuum/fast-syntax-highlighting" \
"zsh-users/zsh-autosuggestions" \
"olets/zsh-abbr" \
"sudosubin/zsh-github-cli" \
"wfxr/forgit" \
"pkulev/zsh-rustup-completion"
# clear the default keybinds, from utils.zsh
clear-keybinds
# load more stuff
source "$ZDOTDIR/fzf-tab.zsh"
source "$ZDOTDIR/keybinds.zsh"
unalias zi
eval "$(zoxide init zsh)"
# fzf keybindings
[ -f $HOME/.fzf/shell/key-bindings.zsh ] && . $HOME/.fzf/shell/key-bindings.zsh
# some more options
setopt NOBEEP
setopt INTERACTIVE_COMMENTS
# ET nvim as manpager
export MANPAGER='nvim +Man! +"set nocul" +"set noshowcmd" +"set noruler" +"set noshowmode" +"set laststatus=0"'
autoload -Uz colors && colors
autoload -Uz promptinit && promptinit
# alias
if command -v lsd >/dev/null; then
alias ls="lsd"
elif command -v exa >/dev/null; then
alias ls="exa"
fi
alias dots="git -C $HOME/dots-of-war"
# load prompt
if command -v starship >/dev/null; then
eval "$(starship init zsh)"
else
source "$ZDOTDIR/prompt.zsh"
fi
if command -v direnv >/dev/null; then
eval "$(direnv hook zsh)"
fi
if command -v luarocks >/dev/null; then
eval "$(luarocks path)"
fi
export EDITOR=nvim
export VISUAL=nvim
export ANDROID_HOME="$HOME/Android/Sdk"
export ANDROID_NDK="$HOME/Android/Sdk/ndk/21.4.7075529"
export JAVA_HOME="/usr/lib/jvm/java-1.19.0-openjdk-amd64/"
if [ -d "$HOME/anaconda3" ]; then
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$("$HOME/anaconda3/bin/conda" 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "$HOME/anaconda3/etc/profile.d/conda.sh" ]; then
. "$HOME/anaconda3/etc/profile.d/conda.sh"
else
export PATH="$HOME/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
fi
export PATH="$HOME/.volta/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/.bun/bin:$PATH"
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
if [ -d "/Applications/WezTerm.app" ]; then
export PATH="/Applications/WezTerm.app/Contents/MacOS:$PATH"
fi
if command -v flutter >/dev/null; then
export PATH="$HOME/.pub-cache/bin:$PATH"
fi
[[ -d "$HOME/.deno/bin" ]] && export PATH="$HOME/.deno/bin:$PATH"
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
if [ -f '~/Downloads/google-cloud-sdk/path.zsh.inc' ]; then . '~/Downloads/google-cloud-sdk/path.zsh.inc'; fi
if [ -f '~/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '~/Downloads/google-cloud-sdk/completion.zsh.inc'; fi
[[ -f '/Applications/Tailscale.app/Contents/MacOS/Tailscale' ]] && alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
command -v jless >/dev/null && alias yless="jless --yaml"

View file

@ -0,0 +1,13 @@
abbr cvim="cd ~/.config/nvim && nvim && cd -"
abbr cnt="cargo nextest run"
abbr cnix="cd ~/.config/nixpkgs && nvim && cd -"
abbr cxmonad="cd ~/.xmonad && nvim lib/Config.hs && cd -"
abbr ra="ranger"
abbr cr="cargo run -- "
abbr g="git "
abbr ga.="git add ."
abbr gaa="git add --all"
abbr gc="git commit"
abbr gr="git rebase "
abbr gs="git ss "
abbr nvc="nvim ~/.config/"

Some files were not shown because too many files have changed in this diff Show more