diff --git a/neovim/default.nix b/neovim/default.nix index d138ddf..20e9a97 100644 --- a/neovim/default.nix +++ b/neovim/default.nix @@ -91,6 +91,9 @@ # vim-wiki vimwiki + + # firenvim + firenvim ]; withNodeJs = true; @@ -137,8 +140,12 @@ require("local_toggleterm") require("local_notify") require("local_comment") - require("local_lualine") - require("local_tabline") + + if vim.g.started_by_firenvim ~= true then + require("local_lualine") + require("local_tabline") + end + require("local_indent-blankline") require("local_gitsigns") require("local_luasnip") @@ -158,6 +165,8 @@ require("nvim-autopairs").setup({}) require("neogen").setup({ snippet_engine = "luasnip" }) + + require("local_firenvim") ''; }; }; @@ -186,4 +195,5 @@ home.file.".config/nvim/lua/local_dap.lua".source = ./dap.lua; home.file.".config/nvim/lua/local_illuminate.lua".source = ./illuminate.lua; home.file.".config/nvim/lua/local_wilder.lua".source = ./wilder.lua; + home.file.".config/nvim/lua/local_firenvim.lua".source = ./firenvim.lua; } diff --git a/neovim/firenvim.lua b/neovim/firenvim.lua new file mode 100644 index 0000000..6f2094d --- /dev/null +++ b/neovim/firenvim.lua @@ -0,0 +1,25 @@ +if vim.g.started_by_firenvim ~= true then + return +end + +vim.api.nvim_create_autocmd('UIEnter', { + callback = function() + local client = vim.api.nvim_get_chan_info(vim.v.event.chan).client + if client ~= nil and client.name == "Firenvim" then + vim.o.laststatus = 0 + end + end +}) + +vim.api.nvim_create_autocmd({ 'TextChanged', 'TextChangedI' }, { + callback = function() + if vim.g.timer_started == true then + return + end + vim.g.timer_started = true + vim.fn.timer_start(500, function() + vim.g.timer_started = false + vim.cmd('silent write') + end) + end +})