[NeoVim] Add FireNvim

This commit is contained in:
2022-10-25 18:51:20 +02:00
committed by Pierre Jeanjean
parent b139567065
commit 2e0102881c
6 changed files with 58 additions and 41 deletions

View File

@@ -1,17 +1,18 @@
(import-macros {: map!} :hibiscus.vim)
(import-macros {: setup} :macros)
(setup :aerial
{:backends [:lsp :treesitter]
:layout {:width 30
:placement "edge"}
:attach_mode "global"
:close_automatic_events [:unsupported]
:open_automatic true
:ignore {:filetypes [""
"neo-tree"
"aerial"
"packer"
"qf"
"help"
"DiffviewFileHistory"]}})
(if (= vim.g.started_by_firenvim nil)
(setup :aerial
{:backends [:lsp :treesitter]
:layout {:width 30
:placement "edge"}
:attach_mode "global"
:close_automatic_events [:unsupported]
:open_automatic true
:ignore {:filetypes [""
"neo-tree"
"aerial"
"packer"
"qf"
"help"
"DiffviewFileHistory"]}}))

View File

@@ -3,16 +3,17 @@
(local colors (require :solarized.colors))
(setup :bufferline
{:options {:close_command "Bdelete %d"
:right_mouse_command "Bdelete %d"
:offsets [{:filetype "neo-tree" :text "File Explorer" :padding 1}
{:filetype "aerial" :text "Outline" :padding 1}]
:enforce_regular_tabs true
:separator_style "slant"}
:highlights {:separator {:fg colors.bg_alt}
:separator_visible {:fg colors.bg_alt}
:separator_selected {:fg colors.bg_alt}}})
(if (= vim.g.started_by_firenvim nil)
(setup :bufferline
{:options {:close_command "Bdelete %d"
:right_mouse_command "Bdelete %d"
:offsets [{:filetype "neo-tree" :text "File Explorer" :padding 1}
{:filetype "aerial" :text "Outline" :padding 1}]
:enforce_regular_tabs true
:separator_style "slant"}
:highlights {:separator {:fg colors.bg_alt}
:separator_visible {:fg colors.bg_alt}
:separator_selected {:fg colors.bg_alt}}}))
(map! [n] :<S-Right> ":bnext<CR>")
(map! [n] :<S-Left> ":bprevious<CR>")

View File

@@ -17,16 +17,17 @@
:white colors.white
:yellow colors.yellow})
(setup :feline
{:theme theme
:force_inactive {:filetypes ["^neo\\-tree$"
"^aerial$"
"^packer$"
"^startify$"
"^fugitive$"
"^fugitiveblame$"
"^qf$"
"^help$"
"^DiffviewFileHistory"]
:buftypes ["^terminal$"]
:bufnames ["neo\\-.*"]}})
(if (= vim.g.started_by_firenvim nil)
(setup :feline
{:theme theme
:force_inactive {:filetypes ["^neo\\-tree$"
"^aerial$"
"^packer$"
"^startify$"
"^fugitive$"
"^fugitiveblame$"
"^qf$"
"^help$"
"^DiffviewFileHistory"]
:buftypes ["^terminal$"]
:bufnames ["neo\\-.*"]}}))

View File

@@ -0,0 +1,9 @@
(import-macros {: g!} :hibiscus.vim)
(g! :firenvim_config {:globalSettings {:alt "all"}
:localSettings {:.* {:cmdline "neovim"
:content "text"
:priority 0
:selector "textarea"
:takeover "always"}
:https://zimbra.inria.fr/ {:selector "body[id=tinymce]"}}})

View File

@@ -72,6 +72,7 @@
(augroup! :neo-tree [[FileType] [qf] "set nobuflisted|call feedkeys(\"F\")"])
; Startup
(if (or (= (vim.fn.expand "%") "") (not= (vim.fn.isdirectory (vim.fn.expand "%")) 0))
((. (require :neo-tree.command) :execute) {:action "focus" :dir (vim.fn.getcwd)})
((. (require :neo-tree.command) :execute) {:action "show" :dir (vim.fn.getcwd)}))
(if (= vim.g.started_by_firenvim nil)
(if (or (= (vim.fn.expand "%") "") (not= (vim.fn.isdirectory (vim.fn.expand "%")) 0))
((. (require :neo-tree.command) :execute) {:action "focus" :dir (vim.fn.getcwd)})
((. (require :neo-tree.command) :execute) {:action "show" :dir (vim.fn.getcwd)})))