diff options
Diffstat (limited to 'fnl/plugins/editor')
-rw-r--r-- | fnl/plugins/editor/cmp.fnl | 1 | ||||
-rw-r--r-- | fnl/plugins/editor/neo-tree.fnl | 58 | ||||
-rw-r--r-- | fnl/plugins/editor/neorg.fnl | 38 | ||||
-rw-r--r-- | fnl/plugins/editor/oil.fnl | 27 | ||||
-rw-r--r-- | fnl/plugins/editor/treesitter.fnl | 1 |
5 files changed, 67 insertions, 58 deletions
diff --git a/fnl/plugins/editor/cmp.fnl b/fnl/plugins/editor/cmp.fnl index b79cd5a..ca09329 100644 --- a/fnl/plugins/editor/cmp.fnl +++ b/fnl/plugins/editor/cmp.fnl @@ -40,6 +40,7 @@ {:name :luasnip} {:name :spell} {:name :orgmode} + {:name :neorg} {:name :buffer :keyword_length 4} {:name :path :keyword_length 6} {:name :vim-dadbod-completion} diff --git a/fnl/plugins/editor/neo-tree.fnl b/fnl/plugins/editor/neo-tree.fnl deleted file mode 100644 index 153d3e5..0000000 --- a/fnl/plugins/editor/neo-tree.fnl +++ /dev/null @@ -1,58 +0,0 @@ -;; File manager. - -(local dependencies [:nvim-lua/plenary.nvim - :nvim-tree/nvim-web-devicons - :MunifTanjim/nui.nvim]) - -(local cursorline (require :util.cursorline)) - -(fn init [] - (set vim.g.neo_tree_remove_legacy_commands 1) - (if (= (vim.fn.argc) 1) - (let [stat (vim.loop.fs_stat (vim.fn.argv 1))] - (if (and stat (= stat.type :directory)) - (require :neo-tree))))) - -(fn deactivate [] - (vim.cmd "Neotree close")) - -(local opts {:sources [:filesystem :buffers :git_status :document_symbols] - :source_selector {:winbar false :statusline false} - :use_popups_for_input false - :enable_git_status false - :enable_diagnostics false - :open_files_do_not_replace_types [:terminal :Trouble :qf :Outline] - :filesystem {:bind_to_cwd false - :follow_current_file true - :hijack_netrw_behavior :open_default - :use_libuv_file_watcher true} - :icon {:folder_closed "" - :folder_open "" - :folder_empty "" - :default "*" - :highlight :NeoTreeFileIcon} - :window {:position :float - :popup {:position {:col "50%" :row :10}} - :mappings {:<space> :none - :P {1 :toggle_preview - :config {:use_float true}} - :l :open - :h :close_node - :. :toggle_hidden - :e :focus_preview}} - :default_component_configs {:indent {:with_expanders true - :expander_collapsed "" - :expander_expanded "" - :expander_highlight :NeoTreeExpander}} - :event_handlers [{:event :neo_tree_buffer_enter - :handler cursorline.show} - {:event :neo_tree_buffer_leave - :handler cursorline.show}]}) - -{1 :nvim-neo-tree/neo-tree.nvim - :keys [{1 "-" 2 "<cmd>Neotree filesystem reveal<cr>" :desc "Open Neotree"}] - :cmd :Neotree - : init - : deactivate - : opts - : dependencies} diff --git a/fnl/plugins/editor/neorg.fnl b/fnl/plugins/editor/neorg.fnl new file mode 100644 index 0000000..6e15a74 --- /dev/null +++ b/fnl/plugins/editor/neorg.fnl @@ -0,0 +1,38 @@ +;; Orgmode but better. + +(local opts {:load {:core.defaults {} + :core.concealer {} + :core.summary {} + :core.completion {:config {:engine :nvim-cmp}} + :core.presenter {:config {:zen_mode :zen-mode}} + :core.dirman {:config {:workspaces {:master "~/.local/share/norg" + :molecular-notes "~/.local/share/norg/molecular-notes" + :gtd "~/.local/share/norg/gtd"} + :autochdir false + :default_workspace :master}} + :core.integrations.telescope {}}}) + +(fn config [] + (let [neorg (require :neorg)] + (neorg.setup opts))) + +(local auto-cmds + [[:FileType + {:pattern :norg + :callback (fn [] + (tset vim.opt_local :conceallevel 3))}]]) + +(fn init [] + (let [cmds (require :util.cmds)] + (cmds.create-auto-cmds auto-cmds))) + +{1 :nvim-neorg/neorg + :build ":Neorg sync-parsers" + :keys [{1 :<cr> 2 :VBox<cr> :mode :v}] + :ft :norg + :cmd :Norg + : init + : config + :dependencies [:nvim-lua/plenary.nvim + :nvim-neorg/neorg-telescope + :jbyuki/venn.nvim]} diff --git a/fnl/plugins/editor/oil.fnl b/fnl/plugins/editor/oil.fnl new file mode 100644 index 0000000..e326663 --- /dev/null +++ b/fnl/plugins/editor/oil.fnl @@ -0,0 +1,27 @@ +;; File explorer that lets you edit your filesystem. + +(local keymaps {:g? :actions.show_help + :<CR> :actions.select + :<C-s> :actions.select_vsplit + :<C-h> :actions.select_split + :<C-t> :actions.select_tab + :<C-p> :actions.preview + :<C-c> :actions.close + :<C-l> :actions.refresh + :- :actions.parent + :_ :actions.open_cwd + "`" :actions.cd + "~" :actions.tcd + :gs :actions.change_sort + :gx :actions.open_external + :g. :actions.toggle_hidden + "g\\\\" :actions.toggle_trash}) + +(fn config [] + (let [oil (require :oil)] + (oil.setup {: keymaps}) + (vim.keymap.set :n "-" (fn [] + (oil.open)) + {:desc "Open parent directory"}))) + +{1 :stevearc/oil.nvim : config :event :VeryLazy} diff --git a/fnl/plugins/editor/treesitter.fnl b/fnl/plugins/editor/treesitter.fnl index e1718be..0062ba1 100644 --- a/fnl/plugins/editor/treesitter.fnl +++ b/fnl/plugins/editor/treesitter.fnl @@ -15,6 +15,7 @@ :lua :make :markdown + :norg :ocaml :org :python |