diff options
Diffstat (limited to 'fnl')
| -rw-r--r-- | fnl/config.fnl (renamed from fnl/aktersnurra.fnl) | 0 | ||||
| -rw-r--r-- | fnl/plugins/bqf.fnl | 2 | ||||
| -rw-r--r-- | fnl/plugins/cmp.fnl | 4 | ||||
| -rw-r--r-- | fnl/plugins/colorscheme.fnl | 12 | ||||
| -rw-r--r-- | fnl/plugins/compile-mode.fnl | 20 | ||||
| -rw-r--r-- | fnl/plugins/conform.fnl | 4 | ||||
| -rw-r--r-- | fnl/plugins/harpoon.fnl | 11 | ||||
| -rw-r--r-- | fnl/plugins/leap.fnl | 19 | ||||
| -rw-r--r-- | fnl/plugins/lsp/keymaps.fnl | 18 | ||||
| -rw-r--r-- | fnl/plugins/lsp/lspconfig.fnl | 2 | ||||
| -rw-r--r-- | fnl/plugins/lsp/mason-lspconfig.fnl | 5 | ||||
| -rw-r--r-- | fnl/plugins/lsp/servers.fnl | 2 | ||||
| -rw-r--r-- | fnl/plugins/lualine.fnl | 4 | ||||
| -rw-r--r-- | fnl/plugins/nvim-lint.fnl | 2 | ||||
| -rw-r--r-- | fnl/plugins/stay-in-place.fnl | 2 | ||||
| -rw-r--r-- | fnl/plugins/surround.fnl | 4 | ||||
| -rw-r--r-- | fnl/plugins/textobjs.fnl | 2 | ||||
| -rw-r--r-- | fnl/plugins/treesitter.fnl | 2 | ||||
| -rw-r--r-- | fnl/plugins/ts-comments.fnl | 2 | ||||
| -rw-r--r-- | fnl/plugins/unison.fnl | 11 | ||||
| -rw-r--r-- | fnl/plugins/window-picker.fnl | 4 | ||||
| -rw-r--r-- | fnl/settings/init.fnl | 1 | ||||
| -rw-r--r-- | fnl/settings/options.fnl | 1 | ||||
| -rw-r--r-- | fnl/settings/terminal.fnl | 25 |
24 files changed, 112 insertions, 47 deletions
diff --git a/fnl/aktersnurra.fnl b/fnl/config.fnl index cf50b2f..cf50b2f 100644 --- a/fnl/aktersnurra.fnl +++ b/fnl/config.fnl diff --git a/fnl/plugins/bqf.fnl b/fnl/plugins/bqf.fnl index 38afd09..8d2ea2a 100644 --- a/fnl/plugins/bqf.fnl +++ b/fnl/plugins/bqf.fnl @@ -24,4 +24,4 @@ :ptoggleauto :a :ptogglemode :P}}) -{1 :kevinhwang91/nvim-bqf :event [:BufReadPost :BufNewFile] : opts} +{1 :kevinhwang91/nvim-bqf :event :VeryLazy : opts} diff --git a/fnl/plugins/cmp.fnl b/fnl/plugins/cmp.fnl index 1eb2e9e..a979633 100644 --- a/fnl/plugins/cmp.fnl +++ b/fnl/plugins/cmp.fnl @@ -3,8 +3,8 @@ (local opts {:keymap {:preset :default} :appearance {:use_nvim_cmp_as_default false :nerd_font_variant :mono} - :completion {:menu {:scrollbar false :border :none} - :documentation {:window {:border :none + :completion {:menu {:scrollbar false :border :single} + :documentation {:window {:border :single :scrollbar false}}} :signature {:enabled false :window {:scrollbar false}} :sources {:default [:lsp :path :snippets :buffer :dadbod] diff --git a/fnl/plugins/colorscheme.fnl b/fnl/plugins/colorscheme.fnl index 2d913ca..96ad95c 100644 --- a/fnl/plugins/colorscheme.fnl +++ b/fnl/plugins/colorscheme.fnl @@ -1,12 +1,16 @@ ;; Load neovim colorscheme. -(local opts {:styles {:type {:bold true} +(local opts {:theme :dark + :styles {:type {:bold true} :lsp {:underline true} :match_paren {:underline true}}}) (λ config [] (let [plugin (require :no-clown-fiesta)] - (plugin.setup opts) - (plugin.load))) + (plugin.load opts))) -{1 :aktersnurra/no-clown-fiesta.nvim :lazy false :priority 1000 : config} +{1 :aktersnurra/no-clown-fiesta.nvim + :lazy false + :priority 1000 + : config + :dev true} diff --git a/fnl/plugins/compile-mode.fnl b/fnl/plugins/compile-mode.fnl new file mode 100644 index 0000000..b8d9c53 --- /dev/null +++ b/fnl/plugins/compile-mode.fnl @@ -0,0 +1,20 @@ +(local keys + [{1 :<m-c> 2 :<cmd>Compile<cr> :desc :Compile} + {1 :<m-C> 2 :<cmd>Recompile<cr> :desc :Recompile} + {1 "]e" 2 :<cmd>NextError<cr> :desc "Next compile error"} + {1 "[e" 2 :<cmd>PrevError<cr> :desc "Prev compile error"}]) + +(λ config [] + (set vim.g.compile_mode {:default_command {:ocaml "dune build"} + :bang_expansion true + :recompile_no_fail true + :auto_jump_to_first_error false + :ask_about_save true + :ask_to_interrupt true + :auto_scroll true})) + +{1 :ej-shafran/compile-mode.nvim + :version :^5.0.0 + :dependencies [:nvim-lua/plenary.nvim] + : config + : keys} diff --git a/fnl/plugins/conform.fnl b/fnl/plugins/conform.fnl index b1b15ba..b84627d 100644 --- a/fnl/plugins/conform.fnl +++ b/fnl/plugins/conform.fnl @@ -17,7 +17,7 @@ :fennel [:fnlfmt] :haskell [:fourmolu] :html [:prettierd] - :http [:jq] + :http [:jq :kulala-fmt] :json [:jq] :lua [:stylua] :markdown [:prettierd] @@ -29,4 +29,4 @@ :toml [:taplo] :yaml [:yamlfmt]}}) -{1 :stevearc/conform.nvim : init : opts :event [:BufReadPost :BufNewFile]} +{1 :stevearc/conform.nvim : init : opts :event :BufRead} diff --git a/fnl/plugins/harpoon.fnl b/fnl/plugins/harpoon.fnl index 62ebf17..3f8f7ac 100644 --- a/fnl/plugins/harpoon.fnl +++ b/fnl/plugins/harpoon.fnl @@ -1,6 +1,9 @@ ;; Harpoon files for navigation. -(local opts {:ui_max_width 64 :title " ⇁ "}) +(local opts + {:ui_max_width 64 + :title " ⇁ " + :settings {:save_on_toggle true :sync_on_ui_close true}}) (local user-cmds [[:HarpoonAdd (λ [] @@ -40,8 +43,4 @@ (select 4)) :desc "Fourth Harpoon"}]) -{1 :ThePrimeagen/harpoon - :branch :harpoon2 - :event [:BufReadPost :BufNewFile] - : init - : keys} +{1 :ThePrimeagen/harpoon :branch :harpoon2 :event :BufRead : init : keys} diff --git a/fnl/plugins/leap.fnl b/fnl/plugins/leap.fnl index 79b94c2..3c846c5 100644 --- a/fnl/plugins/leap.fnl +++ b/fnl/plugins/leap.fnl @@ -1,14 +1,14 @@ ;; Leap through text. (local dependencies [{1 :ggandor/flit.nvim - :event [:BufReadPost :BufNewFile] + :event :VimEnter :opts {:keys {:f :f :F :F :t :t :T :T} :labeled_modes :v :multiline true :opts {}}} - {1 :tpope/vim-repeat :event [:BufReadPost :BufNewFile]} - {1 :ggandor/leap-spooky.nvim - :event [:BufReadPost :BufNewFile] + {1 :tpope/vim-repeat :event :VeryLazy} + {1 :aktersnurra/leap-spooky.nvim + :event :VeryLazy :opts {;; Additional text objects, to be merged with the default ones. ;; E.g.: {'iq', 'aq'} :extra_text_objects [:iq :aq] @@ -33,10 +33,13 @@ (λ config [] (let [leap (require :leap)] (leap.setup {}) - (leap.create_default_mappings) - (vim.keymap.set [:n :x :o] :gs "<Plug>(leap-from-window)"))) + (vim.keymap.set [:n :x :o] :s "<Plug>(leap-forward)") + (vim.keymap.set [:n :x :o] :S "<Plug>(leap-backward)") + (vim.keymap.set [:x :o] :x "<Plug>(leap-forward-till)") + (vim.keymap.set [:x :o] :X "<Plug>(leap-backward-till)") + (vim.keymap.set [:n] :gs "<Plug>(leap-from-window)"))) -{1 :ggandor/leap.nvim +{:url "https://codeberg.org/andyg/leap.nvim" : dependencies - :event [:BufReadPost :BufNewFile] + :event :VeryLazy : config} diff --git a/fnl/plugins/lsp/keymaps.fnl b/fnl/plugins/lsp/keymaps.fnl index 72e03cd..f312581 100644 --- a/fnl/plugins/lsp/keymaps.fnl +++ b/fnl/plugins/lsp/keymaps.fnl @@ -4,15 +4,15 @@ [[:n :gD "<cmd>lua vim.lsp.buf.declaration()<CR>" {:desc :Declaration}] [:n :gd - "<cmd>Telescope lsp_definitions theme=dropdown<cr>" + "<cmd>Telescope lsp_definitions theme=get_dropdown<cr>" {:desc :Definition}] [:n :gI - "<cmd>Telescope lsp_implementations theme=dropdown<cr>" + "<cmd>Telescope lsp_implementations theme=get_dropdown<cr>" {:desc :Implementation}] [:n :gr - "<cmd>Telescope lsp_references theme=dropdown<cr>" + "<cmd>Telescope lsp_references theme=get_dropdown<cr>" {:desc :References}] [:n :gl @@ -20,24 +20,24 @@ {:desc :Diagnostics}] [:n :gj - "<cmd>Telescope diagnostics theme=dropdown<cr>" + "<cmd>Telescope diagnostics theme=get_dropdown<cr>" {:desc "Telescope Diagnostics"}] [:n :gw - "<cmd>Telescope lsp_dynamic_workspace_symbols theme=dropdown<cr>" + "<cmd>Telescope lsp_dynamic_workspace_symbols theme=get_dropdown<cr>" {:desc "Workspace Symbols"}] [:n :gE - "<cmd>Telescope lsp_type_definitions theme=dropdown<cr>" - {:desc "Workspace Symbols"}] + "<cmd>Telescope lsp_type_definitions theme=get_dropdown<cr>" + {:desc "Type Definitions"}] [:n :gm "<cmd>lua vim.lsp.buf.signature_help()<CR>" {:desc :Signature}] [:n :gM - "<cmd>Telescope lsp_document_symbols theme=dropdown<cr>" + "<cmd>Telescope lsp_document_symbols theme=get_dropdown<cr>" {:desc "Document Symbols"}] [:n :gh "<cmd>lua vim.lsp.buf.code_action()<cr>" {:desc "Code Action"}] [:n :gb "<cmd>lua vim.lsp.codelens.run()<cr>" {:desc "Code Lens"}] - [:n :K "<cmd>lua vim.lsp.hover()<cr>" {:desc "Hover documentation"}] + [:n :K "<cmd>lua vim.lsp.buf.hover()<cr>" {:desc "Hover documentation"}] [:n :<leader>li :<cmd>LspInfo<cr> {:desc "Lsp Info"}]]) (λ on-attach [buffer] diff --git a/fnl/plugins/lsp/lspconfig.fnl b/fnl/plugins/lsp/lspconfig.fnl index 5cd25d4..192954c 100644 --- a/fnl/plugins/lsp/lspconfig.fnl +++ b/fnl/plugins/lsp/lspconfig.fnl @@ -17,7 +17,7 @@ (mason-lspconfig.setup))) {1 :neovim/nvim-lspconfig - :event [:BufReadPost :BufNewFile] + :event :BufNew :dependencies [:mason.nvim :williamboman/mason-lspconfig.nvim :b0o/schemastore.nvim diff --git a/fnl/plugins/lsp/mason-lspconfig.fnl b/fnl/plugins/lsp/mason-lspconfig.fnl index 429e948..48ea0b5 100644 --- a/fnl/plugins/lsp/mason-lspconfig.fnl +++ b/fnl/plugins/lsp/mason-lspconfig.fnl @@ -2,9 +2,8 @@ ;; setup hooks for client configurations. (local textDocument-handlers - {:textDocument/hover (vim.lsp.with vim.lsp.handlers.hover {:border :single}) - :textDocument/signatureHelp (vim.lsp.with vim.lsp.handlers.signature_help - {:border :single})}) + {:textDocument/hover (vim.lsp.with vim.lsp.handlers.hover) + :textDocument/signatureHelp (vim.lsp.with vim.lsp.handlers.signature_help)}) (λ capabilities [] (let [blink-cmp (require :blink.cmp)] diff --git a/fnl/plugins/lsp/servers.fnl b/fnl/plugins/lsp/servers.fnl index fea4e89..7d213a8 100644 --- a/fnl/plugins/lsp/servers.fnl +++ b/fnl/plugins/lsp/servers.fnl @@ -16,7 +16,6 @@ [(vim.fn.line "$" 0)]))]}}} :ocamllsp {} - :pyright {} :rust_analyzer {:settings {:rust-analyzer {:lens {:enable true} :checkOnSave {:command :clippy}}}} :lua_ls {:settings {:Lua {:completion {:callSnippet :Replace} @@ -25,6 +24,7 @@ :path (vim.split package.path ";")}}}} :taplo {} :texlab {} + :ty {} :vale_ls {:filetypes [:markdown :text :org]} :sqls {} :yamlls {:settings {:yaml {:schemastore {:enable false :url ""} diff --git a/fnl/plugins/lualine.fnl b/fnl/plugins/lualine.fnl index b2f7e14..b331e79 100644 --- a/fnl/plugins/lualine.fnl +++ b/fnl/plugins/lualine.fnl @@ -55,7 +55,7 @@ :timer {:progress_enddelay 500 :lsp_client_name_enddelay 500}}) (local opts {:options {:icons_enabled true - :theme :auto + :theme :no-clown-fiesta :component_separators "" :section_separators {:left "" :right ""} :disabled_filetypes disable @@ -79,6 +79,6 @@ (local dependencies [:arkav/lualine-lsp-progress]) {1 :nvim-lualine/lualine.nvim - :event [:BufReadPost :BufNewFile] + :event :VeryLazy : opts : dependencies} diff --git a/fnl/plugins/nvim-lint.fnl b/fnl/plugins/nvim-lint.fnl index e2ecdc0..2d1887d 100644 --- a/fnl/plugins/nvim-lint.fnl +++ b/fnl/plugins/nvim-lint.fnl @@ -26,4 +26,4 @@ :yaml [:yamllint] :zsh [:zsh]}))) -{1 :mfussenegger/nvim-lint : init : config :event [:BufReadPost :BufNewFile]} +{1 :mfussenegger/nvim-lint : init : config :event :BufNew} diff --git a/fnl/plugins/stay-in-place.fnl b/fnl/plugins/stay-in-place.fnl index de6deb7..69066d7 100644 --- a/fnl/plugins/stay-in-place.fnl +++ b/fnl/plugins/stay-in-place.fnl @@ -1,3 +1,3 @@ ;; Keep cursor at character when indenting. -{1 :gbprod/stay-in-place.nvim :event [:BufReadPost :BufNewFile] :config true} +{1 :gbprod/stay-in-place.nvim :event :BufRead :config true} diff --git a/fnl/plugins/surround.fnl b/fnl/plugins/surround.fnl index 2942bdb..7b8b684 100644 --- a/fnl/plugins/surround.fnl +++ b/fnl/plugins/surround.fnl @@ -6,7 +6,7 @@ :normal_cur :yss :normal_line :yS :normal_cur_line :ySS - :visual :gS + :visual :mS :visual_line :gS :delete :ds :change :cs @@ -16,4 +16,4 @@ (let [surround (require :nvim-surround)] (surround.setup {: keymaps}))) -{1 :kylechui/nvim-surround :event :VeryLazy : config} +{1 :kylechui/nvim-surround :version :^3.0.0 :event :VeryLazy : config} diff --git a/fnl/plugins/textobjs.fnl b/fnl/plugins/textobjs.fnl index 025e2b5..0f3a1e1 100644 --- a/fnl/plugins/textobjs.fnl +++ b/fnl/plugins/textobjs.fnl @@ -1,5 +1,5 @@ ;; Various text objects. {1 :chrisgrieser/nvim-various-textobjs - :event [:BufReadPost :BufNewFile] + :event :VeryLazy :opts {:keymaps {:useDefaults true}}} diff --git a/fnl/plugins/treesitter.fnl b/fnl/plugins/treesitter.fnl index e2a4b96..b75eba3 100644 --- a/fnl/plugins/treesitter.fnl +++ b/fnl/plugins/treesitter.fnl @@ -20,10 +20,12 @@ :make :markdown :ocaml + :ocaml_interface :python :rust :sql :toml + :unison :vim :vimdoc :xml diff --git a/fnl/plugins/ts-comments.fnl b/fnl/plugins/ts-comments.fnl index d8ce85a..9c08fec 100644 --- a/fnl/plugins/ts-comments.fnl +++ b/fnl/plugins/ts-comments.fnl @@ -1,3 +1,3 @@ ;; Enhance comments with treesitter. -{1 :folke/ts-comments.nvim :opts {} :event [:BufReadPost :BufNewFile]} +{1 :folke/ts-comments.nvim :opts {} :event :VeryLazy} diff --git a/fnl/plugins/unison.fnl b/fnl/plugins/unison.fnl new file mode 100644 index 0000000..ba03ad7 --- /dev/null +++ b/fnl/plugins/unison.fnl @@ -0,0 +1,11 @@ +;; Unison lang support + +(λ config [plugin] + (vim.opt.rtp:append (.. plugin.dir :/editor-support/vim)) + ((. (require :lazy.core.loader) :packadd) (.. plugin.dir :/editor-support/vim))) + +(λ init [plugin] + ((. (require :lazy.core.loader) :ftdetect) (.. plugin.dir + :/editor-support/vim))) + +{1 :unisonweb/unison :branch :trunk : config : init} diff --git a/fnl/plugins/window-picker.fnl b/fnl/plugins/window-picker.fnl index 41225f0..68b7786 100644 --- a/fnl/plugins/window-picker.fnl +++ b/fnl/plugins/window-picker.fnl @@ -1,4 +1,4 @@ -;; Trim whitespaces on save. +;; Select buffer (local opts {:other_win_hl_color "#171717" :fg_color "#E1E1E1" @@ -16,4 +16,4 @@ (vim.keymap.set :n :mw (λ [] (pick-window)) {}))) -{1 :s1n7ax/nvim-window-picker :event [:BufReadPost :BufNewFile] :version :2.0.0 : config} +{1 :s1n7ax/nvim-window-picker :event :VeryLazy :version :2.0.0 : config} diff --git a/fnl/settings/init.fnl b/fnl/settings/init.fnl index 6fcc9c7..d01d848 100644 --- a/fnl/settings/init.fnl +++ b/fnl/settings/init.fnl @@ -1,6 +1,7 @@ ;; Load nvim settings (require :settings.options) +(require :settings.terminal) (vim.api.nvim_create_autocmd :User {:group (vim.api.nvim_create_augroup :Lazy diff --git a/fnl/settings/options.fnl b/fnl/settings/options.fnl index 99f3e5b..c72d415 100644 --- a/fnl/settings/options.fnl +++ b/fnl/settings/options.fnl @@ -81,6 +81,7 @@ :guifont "monospace:h17" :splitkeep :screen :inccommand :split + :winborder :single :shada ["'10" :<0 :s10 :h]}) (each [k v (pairs opts)] diff --git a/fnl/settings/terminal.fnl b/fnl/settings/terminal.fnl new file mode 100644 index 0000000..16464ee --- /dev/null +++ b/fnl/settings/terminal.fnl @@ -0,0 +1,25 @@ +(local state {:buf -1 :win -1}) + +(fn hide-term [] + (vim.api.nvim_win_hide state.win)) + +(fn open-term [] + (let [height (math.floor (* vim.o.lines 0.3))] + (vim.cmd (.. "botright " height :new)) + (set state.win (vim.api.nvim_get_current_win)) + (if (not (vim.api.nvim_buf_is_valid state.buf)) + (do + (set state.buf (vim.api.nvim_get_current_buf)) + (vim.fn.termopen vim.o.shell) + (set vim.opt_local.number false) + (set vim.opt_local.relativenumber false) + (set vim.opt_local.signcolumn :no)) + (vim.api.nvim_win_set_buf state.win state.buf)) + (vim.cmd :startinsert))) + +(fn toggle-term [] + (if (vim.api.nvim_win_is_valid state.win) + (hide-term) + (open-term))) + +(vim.keymap.set [:n :t] :<c-_> toggle-term {:desc "Toggle terminal"}) |