diff --git a/nvim/init.lua b/nvim/init.lua index 63b2570..48f8b74 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -19,3 +19,4 @@ require("neotest_config") require("trouble_config") require("symbols_outline") require("luasnip_config") +require("todotxt_config") diff --git a/nvim/lua/nvimtree.lua b/nvim/lua/nvimtree.lua index f00e0a4..ae64a9c 100644 --- a/nvim/lua/nvimtree.lua +++ b/nvim/lua/nvimtree.lua @@ -1,66 +1,65 @@ -require'nvim-tree'.setup { - renderer ={ - icons = { - padding = ' ', - symlink_arrow = ' >> ', - show = { - git=true, - folder=true, - file=true, - folder_arrow= false - }, - glyphs = { - default= "", - symlink= "", - git= { - unstaged= "✗", - staged= "✓", - unmerged= "", - renamed= "➜", - untracked= "★", - deleted= "", - ignored= "◌" - }, - folder= { - arrow_open= "", - arrow_closed= "", - default= "", - open= "", - empty= "", - empty_open= "", - symlink= "", - symlink_open= "", - } - }, - }, - add_trailing = true, - highlight_opened_files = "all", - root_folder_modifier = ':~', - special_files = { - 'README.md', - 'Makefile', - 'MAKEFILE' - }, - highlight_git = true, - indent_markers = { - enable = true, - icons = { - corner = "└", +require 'nvim-tree'.setup { + renderer = { + icons = { + padding = ' ', + symlink_arrow = ' >> ', + show = { + git = true, + folder = true, + file = true, + folder_arrow = false + }, + glyphs = { + default = "", + symlink = "", + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌" + }, + folder = { + arrow_open = "", + arrow_closed = "", + default = "", + open = "", + empty = "", + empty_open = "", + symlink = "", + symlink_open = "", + } + }, + }, + add_trailing = true, + highlight_opened_files = "all", + root_folder_modifier = ':~', + special_files = { + 'README.md', + 'Makefile', + 'MAKEFILE' + }, + highlight_git = true, + indent_markers = { + enable = true, + icons = { + corner = "└", edge = "│ ", none = " ", - } - } - }, - respect_buf_cwd = true, - disable_netrw = true, - hijack_netrw = true, - open_on_setup = false, - ignore_ft_on_setup = {}, - open_on_tab = false, - hijack_cursor = true, - auto_reload_on_write = true, - update_cwd = false, - diagnostics = { + } + } + }, + respect_buf_cwd = true, + disable_netrw = true, + hijack_netrw = true, + ignore_ft_on_setup = {}, + open_on_tab = false, + hijack_cursor = true, + auto_reload_on_write = true, + hijack_unnamed_buffer_when_opening = true, + diagnostics = { enable = true, icons = { hint = "", @@ -69,36 +68,36 @@ require'nvim-tree'.setup { error = "", } }, - update_focused_file = { + update_focused_file = { enable = true, update_cwd = true, ignore_list = {} }, - system_open = { + system_open = { cmd = nil, args = {} }, - filters = { + filters = { dotfiles = false, custom = {} }, - git={ - ignore = false, - enable= true, - timeout=500, - }, - actions = { - open_file = { + git = { + ignore = false, + enable = true, + timeout = 500, + }, + actions = { + open_file = { resize_window = false, - window_picker = { - exclude = { - filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, - buftype = { "nofile","terminal","help" } - } - } - } - }, - view = { + window_picker = { + exclude = { + filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, + buftype = { "nofile", "terminal", "help" } + } + } + } + }, + view = { width = 35, hide_root_folder = false, side = 'left', @@ -108,3 +107,17 @@ require'nvim-tree'.setup { } } } +local function open_nvim_tree(data) + local directory = vim.fn.isdirectory(data.file) == 1 + if not directory then + return + end + + vim.cmd.enew() + vim.cmd.bw(data.buf) + + vim.cmd.cd(data.file) + require('nvim-tree.api').tree.open() +end + +vim.api.nvim_create_autocmd({ 'VimEnter' }, { callback = open_nvim_tree }) diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 0520ca4..50f3bd8 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -23,7 +23,7 @@ require("packer").startup(function(use) requires = { { "nvim-lua/plenary.nvim" } }, }) use("nvim-lua/lsp-status.nvim") - use("jiangmiao/auto-pairs") + --use("jiangmiao/auto-pairs") use("machakann/vim-sandwich") use("machakann/vim-highlightedyank") use("bling/vim-airline") @@ -55,7 +55,6 @@ require("packer").startup(function(use) require("nvim-treesitter.install").update({ with_sync = true }) end, }) - use("folke/tokyonight.nvim") use("ayu-theme/ayu-vim") use("morhetz/gruvbox") use("simrat39/rust-tools.nvim") @@ -110,4 +109,9 @@ require("packer").startup(function(use) } use 'simrat39/symbols-outline.nvim' use 'j-hui/fidget.nvim' + use { + 'ThyW/todotxt.nvim', + branch = "vim-ui-input", + requires = {'MunifTanjim/nui.nvim'}, +} end) diff --git a/nvim/lua/todotxt_config.lua b/nvim/lua/todotxt_config.lua index 3eb363d..8887899 100644 --- a/nvim/lua/todotxt_config.lua +++ b/nvim/lua/todotxt_config.lua @@ -1,5 +1,4 @@ -todo = require('todotxt-nvim') -todo.setup({ +require('todotxt-nvim').setup({ todo_file = '~/todotxt/todo.txt', sidebar = { width = 40, diff --git a/nvim/lua/trouble_config.lua b/nvim/lua/trouble_config.lua index 17fb7d9..11d8908 100644 --- a/nvim/lua/trouble_config.lua +++ b/nvim/lua/trouble_config.lua @@ -62,7 +62,6 @@ vim.keymap.set("n", "tq", "TroubleToggle quickfix", ) local trouble = require("trouble.providers.telescope") - local telescope = require("telescope") telescope.setup { diff --git a/nvim/plugin/packer_compiled.lua b/nvim/plugin/packer_compiled.lua index 17b36ed..54bf714 100644 --- a/nvim/plugin/packer_compiled.lua +++ b/nvim/plugin/packer_compiled.lua @@ -84,10 +84,10 @@ _G.packer_plugins = { path = "/home/mardie/.local/share/nvim/site/pack/packer/start/LuaSnip", url = "https://github.com/L3MON4D3/LuaSnip" }, - ["auto-pairs"] = { + ["ayu-vim"] = { loaded = true, - path = "/home/mardie/.local/share/nvim/site/pack/packer/start/auto-pairs", - url = "https://github.com/jiangmiao/auto-pairs" + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/ayu-vim", + url = "https://github.com/ayu-theme/ayu-vim" }, ["cmp-buffer"] = { loaded = true, @@ -104,16 +104,51 @@ _G.packer_plugins = { path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", url = "https://github.com/hrsh7th/cmp-nvim-lsp" }, + ["cmp-nvim-lsp-signature-help"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help", + url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help" + }, + ["cmp-nvim-lua"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", + url = "https://github.com/hrsh7th/cmp-nvim-lua" + }, ["cmp-path"] = { loaded = true, path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-path", url = "https://github.com/hrsh7th/cmp-path" }, + ["cmp-vsnip"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp-vsnip", + url = "https://github.com/hrsh7th/cmp-vsnip" + }, cmp_luasnip = { loaded = true, path = "/home/mardie/.local/share/nvim/site/pack/packer/start/cmp_luasnip", url = "https://github.com/saadparwaiz1/cmp_luasnip" }, + ["fidget.nvim"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/fidget.nvim", + url = "https://github.com/j-hui/fidget.nvim" + }, + ["friendly-snippets"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/friendly-snippets", + url = "https://github.com/rafamadriz/friendly-snippets" + }, + ["fugitive-gitlab.vim"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/fugitive-gitlab.vim", + url = "https://github.com/shumphrey/fugitive-gitlab.vim" + }, + gruvbox = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/gruvbox", + url = "https://github.com/morhetz/gruvbox" + }, ["lsp-status.nvim"] = { loaded = true, path = "/home/mardie/.local/share/nvim/site/pack/packer/start/lsp-status.nvim", @@ -164,6 +199,11 @@ _G.packer_plugins = { path = "/home/mardie/.local/share/nvim/site/pack/packer/start/neotest-vim-test", url = "https://github.com/nvim-neotest/neotest-vim-test" }, + ["nui.nvim"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nui.nvim", + url = "https://github.com/MunifTanjim/nui.nvim" + }, ["null-ls.nvim"] = { loaded = true, path = "/home/mardie/.local/share/nvim/site/pack/packer/start/null-ls.nvim", @@ -179,6 +219,26 @@ _G.packer_plugins = { path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-dap", url = "https://github.com/mfussenegger/nvim-dap" }, + ["nvim-dap-python"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-dap-python", + url = "https://github.com/mfussenegger/nvim-dap-python" + }, + ["nvim-dap-ui"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-dap-ui", + url = "https://github.com/rcarriga/nvim-dap-ui" + }, + ["nvim-dap-virtual-text"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text", + url = "https://github.com/theHamsta/nvim-dap-virtual-text" + }, + ["nvim-dap-vscode-js"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-dap-vscode-js", + url = "https://github.com/mxsdev/nvim-dap-vscode-js" + }, ["nvim-lightbulb"] = { loaded = true, path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-lightbulb", @@ -210,6 +270,13 @@ _G.packer_plugins = { path = "/home/mardie/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", url = "https://github.com/kyazdani42/nvim-web-devicons" }, + ["one-small-step-for-vimkind"] = { + loaded = false, + needs_bufread = false, + only_cond = false, + path = "/home/mardie/.local/share/nvim/site/pack/packer/opt/one-small-step-for-vimkind", + url = "https://github.com/jbyuki/one-small-step-for-vimkind" + }, ["packer.nvim"] = { loaded = true, path = "/home/mardie/.local/share/nvim/site/pack/packer/start/packer.nvim", @@ -230,6 +297,16 @@ _G.packer_plugins = { path = "/home/mardie/.local/share/nvim/site/pack/packer/start/rust-tools.nvim", url = "https://github.com/simrat39/rust-tools.nvim" }, + ["symbols-outline.nvim"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim", + url = "https://github.com/simrat39/symbols-outline.nvim" + }, + ["telescope-dap.nvim"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/telescope-dap.nvim", + url = "https://github.com/nvim-telescope/telescope-dap.nvim" + }, ["telescope-lsp-handlers.nvim"] = { loaded = true, path = "/home/mardie/.local/share/nvim/site/pack/packer/start/telescope-lsp-handlers.nvim", @@ -240,17 +317,17 @@ _G.packer_plugins = { path = "/home/mardie/.local/share/nvim/site/pack/packer/start/telescope.nvim", url = "https://github.com/nvim-telescope/telescope.nvim" }, + ["todotxt.nvim"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/todotxt.nvim", + url = "https://github.com/ThyW/todotxt.nvim" + }, ["toggleterm.nvim"] = { config = { "\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15toggleterm\frequire\0" }, loaded = true, path = "/home/mardie/.local/share/nvim/site/pack/packer/start/toggleterm.nvim", url = "https://github.com/akinsho/toggleterm.nvim" }, - ["tokyonight.nvim"] = { - loaded = true, - path = "/home/mardie/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", - url = "https://github.com/folke/tokyonight.nvim" - }, ["trouble.nvim"] = { loaded = true, path = "/home/mardie/.local/share/nvim/site/pack/packer/start/trouble.nvim", @@ -261,6 +338,11 @@ _G.packer_plugins = { path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-airline", url = "https://github.com/bling/vim-airline" }, + ["vim-doge"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-doge", + url = "https://github.com/kkoomen/vim-doge" + }, ["vim-easymotion"] = { loaded = true, path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-easymotion", @@ -286,6 +368,11 @@ _G.packer_plugins = { path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-sandwich", url = "https://github.com/machakann/vim-sandwich" }, + ["vim-vsnip"] = { + loaded = true, + path = "/home/mardie/.local/share/nvim/site/pack/packer/start/vim-vsnip", + url = "https://github.com/hrsh7th/vim-vsnip" + }, ["which-key.nvim"] = { config = { "\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0" }, loaded = true, @@ -295,18 +382,46 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) --- Config for: nvim-test -time([[Config for nvim-test]], true) -try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14nvim-test\frequire\0", "config", "nvim-test") -time([[Config for nvim-test]], false) --- Config for: which-key.nvim -time([[Config for which-key.nvim]], true) -try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0", "config", "which-key.nvim") -time([[Config for which-key.nvim]], false) +local module_lazy_loads = { + ["^osv"] = "one-small-step-for-vimkind" +} +local lazy_load_called = {['packer.load'] = true} +local function lazy_load_module(module_name) + local to_load = {} + if lazy_load_called[module_name] then return nil end + lazy_load_called[module_name] = true + for module_pat, plugin_name in pairs(module_lazy_loads) do + if not _G.packer_plugins[plugin_name].loaded and string.match(module_name, module_pat) then + to_load[#to_load + 1] = plugin_name + end + end + + if #to_load > 0 then + require('packer.load')(to_load, {module = module_name}, _G.packer_plugins) + local loaded_mod = package.loaded[module_name] + if loaded_mod then + return function(modname) return loaded_mod end + end + end +end + +if not vim.g.packer_custom_loader_enabled then + table.insert(package.loaders, 1, lazy_load_module) + vim.g.packer_custom_loader_enabled = true +end + -- Config for: toggleterm.nvim time([[Config for toggleterm.nvim]], true) try_loadstring("\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15toggleterm\frequire\0", "config", "toggleterm.nvim") time([[Config for toggleterm.nvim]], false) +-- Config for: which-key.nvim +time([[Config for which-key.nvim]], true) +try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14which-key\frequire\0", "config", "which-key.nvim") +time([[Config for which-key.nvim]], false) +-- Config for: nvim-test +time([[Config for nvim-test]], true) +try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\14nvim-test\frequire\0", "config", "nvim-test") +time([[Config for nvim-test]], false) _G._packer.inside_compile = false if _G._packer.needs_bufread == true then