diff --git a/init.lua b/init.lua index df7e3ce4..3325d65d 100644 --- a/init.lua +++ b/init.lua @@ -81,7 +81,11 @@ require('lazy').setup({ 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status 'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons }, - init = function() vim.g.barbar_auto_setup = false end, + init = function() + if not vim.g.started_by_firenvim then + vim.g.barbar_auto_setup = false + end + end, opts = { -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default: -- animation = true, @@ -105,6 +109,16 @@ require('lazy').setup({ require('autoclose').setup() end }, + { + 'glacambre/firenvim', + + -- Lazy load firenvim + -- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297 + lazy = not vim.g.started_by_firenvim, + build = function() + vim.fn["firenvim#install"](0) + end + }, -- NOTE: This is where your plugins related to LSP can be installed. -- The configuration is done below. Search for lspconfig to find it below. @@ -612,5 +626,23 @@ cmp.setup { vim.api.nvim_command [[set tabstop=4]] +vim.g.firenvim_config = { + globalSettings = { + alt = "all", + takeover = "never", + }, + localSettings = { + [".*"] = { + cmdline = "neovim", + content = "text", + priority = 0, + selector = "textarea", + takeover = "never" + } + } +} +if vim.g.started_by_firenvim == true then + vim.o.showtabline = 0 +end -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/kickstart/plugins/autoformat.lua b/lua/kickstart/plugins/autoformat.lua index bc56b15b..b497fec9 100644 --- a/lua/kickstart/plugins/autoformat.lua +++ b/lua/kickstart/plugins/autoformat.lua @@ -14,6 +14,20 @@ return { print('Setting autoformatting to: ' .. tostring(format_is_enabled)) end, {}) + local function disableAutoFormat() + format_is_enabled = false + print('Setting autoformatting to: ' .. tostring(format_is_enabled)) + end + + -- Command to just disable auto formatting + vim.api.nvim_create_user_command('KickstartDisableFormat', disableAutoFormat, {}) + + + vim.api.nvim_create_autocmd({ 'BufRead', 'BufNewFile' }, { + pattern = "*.java", + callback = disableAutoFormat + }) + -- Create an augroup that is used for managing our formatting autocmds. -- We need one augroup per client to make sure that multiple clients -- can attach to the same buffer without interfering with each other.