diff --git a/init.lua b/init.lua index 036fe6d..1efc984 100644 --- a/init.lua +++ b/init.lua @@ -1,51 +1,100 @@ --- rafi Neovim entry-point --- https://git.cscherr.de/PlexSheep/neovim-conf - -local config = require('plex.config') +local config = require("plex.config") config.ensure_lazy() +if vim.g.started_by_firenvim == true then + vim.o.guifont = "FiraCode Nerd Font:h18" + vim.o.lines = vim.o.lines + 10 + vim.o.columns = vim.o.columns + 10 + -- Start lazy.nvim plugin manager. + require("lazy").setup(vim.tbl_extend("keep", config.user_lazy_opts(), { + spec = { + { import = "plex.plugins.core" }, + { import = "plex.plugins.editor" }, + { import = "plex.plugins.extras.browser" }, --- Start lazy.nvim plugin manager. -require('lazy').setup(vim.tbl_extend('keep', config.user_lazy_opts(), { - spec = { - { import = 'plex.plugins' }, - { import = 'plex.plugins.extras.coding' }, - { import = 'plex.plugins.extras.ui' }, - { import = 'plex.plugins.extras.treesitter' }, - { import = 'plex.plugins.extras.formatting' }, - { import = 'plex.plugins.extras.editor' }, - { import = 'plex.plugins.extras.org' }, - { import = 'plex.plugins.extras.lang.go' }, - { import = 'plex.plugins.extras.lang.cpp' }, -- also does C and rust - { import = 'plex.plugins.extras.lang.json' }, - { import = 'plex.plugins.extras.lang.polyglot' }, - { import = 'plex.plugins.extras.lang.python' }, - { import = 'plex.plugins.extras.lang.yaml' }, - - -- This will load a custom user lua/plugins.lua or lua/plugins/* - config.has_user_plugins() and { import = 'plugins' } or nil, - }, - concurrency = vim.loop.available_parallelism() * 2, - defaults = { lazy = true, version = false }, - dev = { path = config.path_join(vim.fn.stdpath('config'), 'dev') }, - install = { missing = true, colorscheme = {} }, - checker = { enabled = true, notify = false }, - change_detection = { notify = false }, - ui = { border = 'rounded' }, - diff = { cmd = 'terminal_git' }, - performance = { - rtp = { - disabled_plugins = { - 'gzip', - 'vimballPlugin', - 'matchit', - 'matchparen', - '2html_plugin', - 'tarPlugin', - 'tutor', - 'zipPlugin', + -- This will load a custom user lua/plugins.lua or lua/plugins/* + config.has_user_plugins() and { import = "plugins" } or nil, + }, + concurrency = vim.loop.available_parallelism() * 2, + defaults = { lazy = true, version = false }, + dev = { path = config.path_join(vim.fn.stdpath("config"), "dev") }, + install = { missing = true, colorscheme = {} }, + checker = { enabled = true, notify = false }, + change_detection = { notify = false }, + ui = { border = "rounded" }, + diff = { cmd = "terminal_git" }, + performance = { + rtp = { + disabled_plugins = { + "gzip", + "vimballPlugin", + "matchit", + "noice.nvim", + "nvim-notify", + "2html_plugin", + "tarPlugin", + "bufferline.nvim", + "tutor", + "zipPlugin", + }, }, }, - }, -})) + })) -config.setup() + config.setup() + + vim.keymap.set("n", "", function() + vim.o.lines = vim.o.lines + 1 + end, { expr = true, desc = "Make Display bigger" }) + vim.keymap.set("n", "", function() + vim.o.lines = vim.o.lines - 1 + end, { expr = true, desc = "Make Display smaller" }) +else + vim.o.laststatus = 2 + vim.o.showtabline = 2 + + -- Start lazy.nvim plugin manager. + require("lazy").setup(vim.tbl_extend("keep", config.user_lazy_opts(), { + spec = { + { import = "plex.plugins" }, + { import = "plex.plugins.extras.coding" }, + { import = "plex.plugins.extras.ui" }, + { import = "plex.plugins.extras.treesitter" }, + { import = "plex.plugins.extras.formatting" }, + { import = "plex.plugins.extras.editor" }, + { import = "plex.plugins.extras.org" }, + { import = "plex.plugins.extras.lang.go" }, + { import = "plex.plugins.extras.lang.cpp" }, -- also does C and rust + { import = "plex.plugins.extras.lang.json" }, + { import = "plex.plugins.extras.lang.polyglot" }, + { import = "plex.plugins.extras.lang.python" }, + { import = "plex.plugins.extras.lang.yaml" }, + + -- This will load a custom user lua/plugins.lua or lua/plugins/* + config.has_user_plugins() and { import = "plugins" } or nil, + }, + concurrency = vim.loop.available_parallelism() * 2, + defaults = { lazy = true, version = false }, + dev = { path = config.path_join(vim.fn.stdpath("config"), "dev") }, + install = { missing = true, colorscheme = {} }, + checker = { enabled = true, notify = false }, + change_detection = { notify = false }, + ui = { border = "rounded" }, + diff = { cmd = "terminal_git" }, + performance = { + rtp = { + disabled_plugins = { + "gzip", + "vimballPlugin", + "matchit", + "matchparen", + "2html_plugin", + "tarPlugin", + "tutor", + "zipPlugin", + }, + }, + }, + })) + + config.setup() +end diff --git a/lua/plex/config/keymaps.lua b/lua/plex/config/keymaps.lua index 18c8053..a13dd49 100644 --- a/lua/plex/config/keymaps.lua +++ b/lua/plex/config/keymaps.lua @@ -32,8 +32,8 @@ map('n', 'l', 'Lazy', { desc = 'Open Lazy UI' }) -- Move faster between lines -- See vim-smoothie ---map({ 'n', 'x' }, 'K', "") ---map({ 'n', 'x' }, 'J', "") +map({ 'n', 'x' }, 'K', "") +map({ 'n', 'x' }, 'J', "") -- Easier line-wise movement map({'n', 'v'}, 'H', '') diff --git a/lua/plex/config/options.lua b/lua/plex/config/options.lua index 11aef7e..7131527 100644 --- a/lua/plex/config/options.lua +++ b/lua/plex/config/options.lua @@ -140,7 +140,13 @@ opt.number = true -- Show line numbers opt.ruler = true -- Default status ruler opt.list = true -- Show hidden characters -opt.showtabline = 2 -- Always show the tabs line +if vim.g.started_by_firenvim == false then + opt.showtabline = 2 -- Always show the tabs line + opt.laststatus = 2 -- Always show laststatus +else + opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab + opt.laststatus = 1 -- Don't show laststatus in firenvim +end opt.helpheight = 0 -- Disable help window resizing opt.winwidth = 30 -- Minimum width for active window opt.winminwidth = 1 -- Minimum width for inactive windows diff --git a/lua/plex/plugins/extras/browser/firenvim.lua b/lua/plex/plugins/extras/browser/firenvim.lua new file mode 100644 index 0000000..6813643 --- /dev/null +++ b/lua/plex/plugins/extras/browser/firenvim.lua @@ -0,0 +1,12 @@ +return { + { + "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, + }, +}