[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

@@ -105,4 +105,8 @@
(use! :folke/noice.nvim
:event :VimEnter
:requires [:MunifTanjim/nui.nvim]
:module :settings.noice))
:module :settings.noice)
(use! :glacambre/firenvim
:run (fn [] ((. vim.fn :firenvim#install) 0))
:module :settings.firenvim))

View File

@@ -1,6 +1,7 @@
(import-macros {: map!} :hibiscus.vim)
(import-macros {: setup} :macros)
(if (= vim.g.started_by_firenvim nil)
(setup :aerial
{:backends [:lsp :treesitter]
:layout {:width 30
@@ -14,4 +15,4 @@
"packer"
"qf"
"help"
"DiffviewFileHistory"]}})
"DiffviewFileHistory"]}}))

View File

@@ -3,6 +3,7 @@
(local colors (require :solarized.colors))
(if (= vim.g.started_by_firenvim nil)
(setup :bufferline
{:options {:close_command "Bdelete %d"
:right_mouse_command "Bdelete %d"
@@ -12,7 +13,7 @@
:separator_style "slant"}
:highlights {:separator {:fg colors.bg_alt}
:separator_visible {:fg colors.bg_alt}
:separator_selected {: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,6 +17,7 @@
:white colors.white
:yellow colors.yellow})
(if (= vim.g.started_by_firenvim nil)
(setup :feline
{:theme theme
:force_inactive {:filetypes ["^neo\\-tree$"
@@ -29,4 +30,4 @@
"^help$"
"^DiffviewFileHistory"]
:buftypes ["^terminal$"]
:bufnames ["neo\\-.*"]}})
: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 (= 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)}))
((. (require :neo-tree.command) :execute) {:action "show" :dir (vim.fn.getcwd)})))