diff --git a/.config/nvim/fnl/plugins.fnl b/.config/nvim/fnl/plugins.fnl index e18c0bc..dadbe3e 100644 --- a/.config/nvim/fnl/plugins.fnl +++ b/.config/nvim/fnl/plugins.fnl @@ -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)) diff --git a/.config/nvim/fnl/settings/aerial.fnl b/.config/nvim/fnl/settings/aerial.fnl index d655dfd..18d375e 100644 --- a/.config/nvim/fnl/settings/aerial.fnl +++ b/.config/nvim/fnl/settings/aerial.fnl @@ -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"]}})) diff --git a/.config/nvim/fnl/settings/bufferline.fnl b/.config/nvim/fnl/settings/bufferline.fnl index 0043339..0d60c56 100644 --- a/.config/nvim/fnl/settings/bufferline.fnl +++ b/.config/nvim/fnl/settings/bufferline.fnl @@ -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] : ":bnext") (map! [n] : ":bprevious") diff --git a/.config/nvim/fnl/settings/feline.fnl b/.config/nvim/fnl/settings/feline.fnl index 0a53910..012f154 100644 --- a/.config/nvim/fnl/settings/feline.fnl +++ b/.config/nvim/fnl/settings/feline.fnl @@ -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\\-.*"]}})) diff --git a/.config/nvim/fnl/settings/firenvim.fnl b/.config/nvim/fnl/settings/firenvim.fnl new file mode 100644 index 0000000..dda9447 --- /dev/null +++ b/.config/nvim/fnl/settings/firenvim.fnl @@ -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]"}}}) diff --git a/.config/nvim/fnl/settings/neo-tree.fnl b/.config/nvim/fnl/settings/neo-tree.fnl index 642a114..8a2f125 100644 --- a/.config/nvim/fnl/settings/neo-tree.fnl +++ b/.config/nvim/fnl/settings/neo-tree.fnl @@ -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)})))