diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 27db2cc..bd101cd 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -41,8 +41,9 @@ "oil.nvim": { "branch": "master", "commit": "3727410e4875ad8ba339c585859a9391d643b9ed" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "telescope-undo.nvim": { "branch": "main", "commit": "a3dcb6e32a3a59a5570a7cda33171eeef9753345" }, "telescope.nvim": { "branch": "0.1.x", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" }, - "undotree": { "branch": "master", "commit": "170aa9e516b6926e6bddfe21bbf01f2283a00e7d" }, + "undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" }, "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" } } \ No newline at end of file diff --git a/.config/nvim/lua/tovi/plugins/formatting.lua b/.config/nvim/lua/tovi/plugins/formatting.lua index 0d14e9b..12bd447 100644 --- a/.config/nvim/lua/tovi/plugins/formatting.lua +++ b/.config/nvim/lua/tovi/plugins/formatting.lua @@ -18,8 +18,6 @@ return { rust = { "rustfmt" }, shell = { "shfmt", "shellcheck" }, python = { "isort", "black" }, - ["*"] = { "codespell" }, - ["_"] = { "trim_whitespace" }, }, format_on_save = { lsp_fallback = true, @@ -29,8 +27,8 @@ return { format_after_save = { lsp_fallback = true, }, - log_level = vim.log.levels.ERROR, - notify_on_error = true, + log_level = vim.log.levels.WARN, + notify_on_error = false, }) vim.keymap.set({ "n", "v" }, "ff", function() diff --git a/.config/nvim/lua/tovi/plugins/lualine.lua b/.config/nvim/lua/tovi/plugins/lualine.lua index 2739f09..2ed12e2 100644 --- a/.config/nvim/lua/tovi/plugins/lualine.lua +++ b/.config/nvim/lua/tovi/plugins/lualine.lua @@ -3,7 +3,7 @@ return { dependencies = { "nvim-tree/nvim-web-devicons" }, config = function() local lualine = require("lualine") - local lazy_status = require("lazy.status") -- to configure lazy pending updates count + local lazy_status = require("lazy.status") local colors = { blue = "#65D1FF", @@ -53,15 +53,24 @@ return { lualine.setup({ options = { theme = my_lualine_theme, + section_separators = { left = "", right = "" }, + component_separators = { left = "|", right = "|" }, }, sections = { + lualine_b = { + { "diagnostics" }, + { "branch" }, + { "diff" }, + }, + lualine_c = { + { "filename", file_status = true, path = 1 }, + }, lualine_x = { { lazy_status.updates, cond = lazy_status.has_updates, color = { fg = "#ff9e64" }, }, - { "encoding" }, { "fileformat" }, { "filetype" }, }, diff --git a/.config/nvim/lua/tovi/plugins/telescope.lua b/.config/nvim/lua/tovi/plugins/telescope.lua index a031f97..ac6a489 100644 --- a/.config/nvim/lua/tovi/plugins/telescope.lua +++ b/.config/nvim/lua/tovi/plugins/telescope.lua @@ -5,6 +5,7 @@ return { "nvim-lua/plenary.nvim", { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, "nvim-tree/nvim-web-devicons", + "debugloop/telescope-undo.nvim", }, config = function() local telescope = require("telescope") @@ -68,9 +69,26 @@ return { }, }, }, + extensions = { + undo = { + side_by_side = true, + mappings = { + i = { + [""] = require("telescope-undo.actions").restore, + }, + n = { + [""] = require("telescope-undo.actions").restore, + ["y"] = require("telescope-undo.actions").yank_additions, + ["Y"] = require("telescope-undo.actions").yank_deletions, + ["u"] = require("telescope-undo.actions").restore, + }, + }, + }, + }, }) telescope.load_extension("fzf") + telescope.load_extension("undo") local git_branches = function() builtin.git_branches({ @@ -113,5 +131,7 @@ return { hidden = true, }) end, { desc = "Find neovim config files" }) + + vim.keymap.set("n", "u", "Telescope undo") end, } diff --git a/.config/nvim/lua/tovi/plugins/undotree.lua b/.config/nvim/lua/tovi/plugins/undotree.lua index 097b621..6ef9999 100644 --- a/.config/nvim/lua/tovi/plugins/undotree.lua +++ b/.config/nvim/lua/tovi/plugins/undotree.lua @@ -1,6 +1,6 @@ return { "mbbill/undotree", config = function() - vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) + -- vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) end, }