diff --git a/.config/nvim/lua/lazyvim/config/autocmd.lua b/.config/nvim/lua/lazyvim/config/autocmd.lua index d1ed725..8264002 100644 --- a/.config/nvim/lua/lazyvim/config/autocmd.lua +++ b/.config/nvim/lua/lazyvim/config/autocmd.lua @@ -92,15 +92,5 @@ autocmd BufWritePre *.[ch] %s/\%$/\r/e autocmd BufWritePre * cal cursor(currPos[1], currPos[2]) ]]) --- Recompile and restart Xmonad on save of config file for Xmonad or Xmobar -vim.cmd( - [[autocmd BufWritePost ~/.xmonad/xmonad.hs,~/.config/xmobar/xmobar-main.hs,~/.config/xmobar/xmobar-sub.hs,~/.config/xmobar/xmobar-single.hs !xmonad --recompile && xmonad --restart]] -) - -- Run custom textclear command when exiting a .tex file (cleanup files) vim.cmd([[autocmd VimLeave *.tex !texclear %]]) - --- Run install when editing my scripts -vim.cmd([[ -autocmd BufWritePost ~/repos/inks-scripts/scripts/** !~/repos/inks-scripts/install -]]) diff --git a/.config/nvim/lua/lazyvim/config/keymaps.lua b/.config/nvim/lua/lazyvim/config/keymaps.lua index b3aaf67..4f198e4 100644 --- a/.config/nvim/lua/lazyvim/config/keymaps.lua +++ b/.config/nvim/lua/lazyvim/config/keymaps.lua @@ -52,10 +52,3 @@ map("i", "jk", "", opts) -- Indenting map("v", "<", "", ">gv", opts) - --- Move text up and down -map("v", "", ":m .+1==V", opts) -map("v", "", ":m .-2==V", opts) - --- Don't have a terminal implemented yet but when I do... -map("t", "", "", { desc = "Enter Normal Mode" }) diff --git a/.config/nvim/lua/lazyvim/config/options.lua b/.config/nvim/lua/lazyvim/config/options.lua index 0f12bd9..402f62b 100644 --- a/.config/nvim/lua/lazyvim/config/options.lua +++ b/.config/nvim/lua/lazyvim/config/options.lua @@ -56,6 +56,3 @@ end vim.cmd("set whichwrap+=<,>,[,],h,l") vim.cmd("set colorcolumn=80") vim.cmd([[set iskeyword+=-]]) - --- fix markdown indentation settings -vim.g.markdown_recommended_style = 0 diff --git a/.config/nvim/lua/lazyvim/plugins/starter.lua b/.config/nvim/lua/lazyvim/plugins/starter.lua deleted file mode 100644 index 88206ce..0000000 --- a/.config/nvim/lua/lazyvim/plugins/starter.lua +++ /dev/null @@ -1,71 +0,0 @@ -return { - { - "echasnovski/mini.starter", - enabled = false, - version = false, -- wait till new 0.7.0 release to put it back on semver - event = "VimEnter", - config = function() - local logo = table.concat({ - "██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z", - "██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z", - "██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z", - "██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z", - "███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║", - "╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝", - }, "\n") - local pad = string.rep(" ", 22) - local new_section = function(name, action, section) - return { name = name, action = action, section = pad .. section } - end - - local starter = require("mini.starter") - --stylua: ignore - local config = { - evaluate_single = true, - header = logo, - items = { - new_section("Find file", "Telescope find_files", "Telescope"), - new_section("Recent files", "Telescope oldfiles", "Telescope"), - new_section("Grep text", "Telescope live_grep", "Telescope"), - new_section("init.lua", "e $MYVIMRC", "Config"), - new_section("Lazy", "Lazy", "Config"), - new_section("New file", "ene | startinsert", "Built-in"), - new_section("Quit", "qa", "Built-in"), - }, - content_hooks = { - starter.gen_hook.adding_bullet(pad .. "░ ", false), - starter.gen_hook.aligning("center", "center"), - }, - } - - -- close Lazy and re-open when starter is ready - if vim.o.filetype == "lazy" then - vim.cmd.close() - vim.api.nvim_create_autocmd("User", { - pattern = "MiniStarterOpened", - callback = function() - require("lazy").show() - end, - }) - end - - starter.setup(config) - - vim.api.nvim_create_autocmd("User", { - pattern = "LazyVimStarted", - callback = function() - local stats = require("lazy").stats() - local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) - local pad_footer = string.rep(" ", 8) - MiniStarter.config.footer = pad_footer - .. "⚡ Neovim loaded " - .. stats.count - .. " plugins in " - .. ms - .. "ms" - pcall(MiniStarter.refresh) - end, - }) - end, - }, -} diff --git a/.config/nvim/lua/lazyvim/utils/init.lua b/.config/nvim/lua/lazyvim/utils/init.lua index eff566e..4f885ac 100644 --- a/.config/nvim/lua/lazyvim/utils/init.lua +++ b/.config/nvim/lua/lazyvim/utils/init.lua @@ -26,7 +26,7 @@ function M.get_root() ---@type string[] local roots = {} if path then - for _, client in pairs(vim.lsp.get_active_clients({ bufnr = 0 })) do + for _, client in pairs(vim.lsp.get_clients({ bufnr = 0 })) do local workspace = client.config.workspace_folders local paths = workspace and vim.tbl_map(function(ws) @@ -82,17 +82,6 @@ function M.toggle(option, silent, values) end end --- FIXME: create a togglable termiminal --- Opens a floating terminal (interactive by default) ----@param cmd? string[]|string ----@param opts? LazyCmdOptions|{interactive?:boolean} -function M.float_term(cmd, opts) - opts = vim.tbl_deep_extend("force", { - size = { width = 0.9, height = 0.9 }, - }, opts or {}) - require("lazy.util").float_term(cmd, opts) -end - local enabled = true function M.toggle_diagnostics() enabled = not enabled