From 3f1ad2f64224d6b8204bf56f20e83a44fa2f37c6 Mon Sep 17 00:00:00 2001 From: Ben Kyd Date: Mon, 30 Jan 2023 00:04:02 +0000 Subject: [PATCH] update that --- .../nvim/lua/plugin-config/codewindow.lua | 17 +++ .../nvim/lua/plugin-config/nvim-tree.lua | 128 +++++++++--------- home/.config/nvim/lua/plugins.lua | 33 ++--- home/.config/nvim/plugin/packer_compiled.lua | 76 +++++------ 4 files changed, 125 insertions(+), 129 deletions(-) create mode 100644 home/.config/nvim/lua/plugin-config/codewindow.lua diff --git a/home/.config/nvim/lua/plugin-config/codewindow.lua b/home/.config/nvim/lua/plugin-config/codewindow.lua new file mode 100644 index 0000000..012e834 --- /dev/null +++ b/home/.config/nvim/lua/plugin-config/codewindow.lua @@ -0,0 +1,17 @@ +local codewindow = require('codewindow') +codewindow.setup { + active_in_terminals = false, -- Should the minimap activate for terminal buffers + auto_enable = false, -- Automatically open the minimap when entering a (non-excluded) buffer (accepts a table of filetypes) + exclude_filetypes = { "NvimTree" }, -- Choose certain filetypes to not show minimap on + max_minimap_height = nil, -- The maximum height the minimap can take (including borders) + max_lines = nil, -- If auto_enable is true, don't open the minimap for buffers which have more than this many lines. + minimap_width = 20, -- The width of the text part of the minimap + use_lsp = true, -- Use the builtin LSP to show errors and warnings + use_treesitter = true, -- Use nvim-treesitter to highlight the code + use_git = true, -- Show small dots to indicate git additions and deletions + width_multiplier = 2, -- How many characters one dot represents + z_index = 1, -- The z-index the floating window will be on + show_cursor = true, -- Show the cursor position in the minimap + window_border = 'single' -- The border style of the floating window (accepts all usual options) +} +codewindow.apply_default_keybinds() diff --git a/home/.config/nvim/lua/plugin-config/nvim-tree.lua b/home/.config/nvim/lua/plugin-config/nvim-tree.lua index a8f4c5e..e2d6dc6 100644 --- a/home/.config/nvim/lua/plugin-config/nvim-tree.lua +++ b/home/.config/nvim/lua/plugin-config/nvim-tree.lua @@ -1,67 +1,67 @@ -local opts = {silent = true, noremap = true} -vim.api.nvim_set_keymap('n', '', 'NvimTreeToggle', opts) -vim.api.nvim_set_keymap('n', 'r', 'NvimTreeRefresh', opts) --- find the currently open file in tree -vim.api.nvim_set_keymap('n', 'n', 'NvimTreeFindFile', opts) +-- local opts = {silent = true, noremap = true} +-- vim.api.nvim_set_keymap('n', '', 'NvimTreeToggle', opts) +-- vim.api.nvim_set_keymap('n', 'r', 'NvimTreeRefresh', opts) +-- -- find the currently open file in tree +-- vim.api.nvim_set_keymap('n', 'n', 'NvimTreeFindFile', opts) -local tree_cb = require'nvim-tree.config'.nvim_tree_callback -local list = { - { key = "", cb = tree_cb("tabnew") }, - { key = "", cb = tree_cb("edit") }, - { key = "o", cb = tree_cb("edit") }, - { key = "<2-LeftMouse>", cb = tree_cb("edit") }, - { key = "<2-RightMouse>", cb = tree_cb("cd") }, - { key = "", cb = tree_cb("preview") }, - { key = "R", cb = tree_cb("refresh") }, - { key = "a", cb = tree_cb("create") }, - { key = "d", cb = tree_cb("remove") }, - { key = "r", cb = tree_cb("rename") }, - { key = "x", cb = tree_cb("cut") }, - { key = "y", cb = tree_cb("copy") }, - { key = "p", cb = tree_cb("paste") }, - { key = "<", cb = tree_cb("dir_up") }, - { key = "q", cb = tree_cb("close") } -} +-- local tree_cb = require'nvim-tree.config'.nvim_tree_callback +-- local list = { +-- { key = "", cb = tree_cb("tabnew") }, +-- { key = "", cb = tree_cb("edit") }, +-- { key = "o", cb = tree_cb("edit") }, +-- { key = "<2-LeftMouse>", cb = tree_cb("edit") }, +-- { key = "<2-RightMouse>", cb = tree_cb("cd") }, +-- { key = "", cb = tree_cb("preview") }, +-- { key = "R", cb = tree_cb("refresh") }, +-- { key = "a", cb = tree_cb("create") }, +-- { key = "d", cb = tree_cb("remove") }, +-- { key = "r", cb = tree_cb("rename") }, +-- { key = "x", cb = tree_cb("cut") }, +-- { key = "y", cb = tree_cb("copy") }, +-- { key = "p", cb = tree_cb("paste") }, +-- { key = "<", cb = tree_cb("dir_up") }, +-- { key = "q", cb = tree_cb("close") } +-- } -require'nvim-tree'.setup { - disable_netrw = true, - hijack_netrw = true, - open_on_setup = false, - ignore_ft_on_setup = {}, - open_on_tab = false, - hijack_cursor = false, - update_cwd = false, - diagnostics = { - enable = false, - icons = { - hint = "", - info = "", - warning = "", - error = "", - } - }, - update_focused_file = { - enable = false, - update_cwd = false, - ignore_list = {} - }, - system_open = { - cmd = nil, - args = {} - }, - filters = { - dotfiles = false, - custom = {} - }, - view = { - width = 30, - height = 30, - hide_root_folder = false, - side = 'left', - mappings = { - custom_only = false, - list = list, - } - } -} +-- require'nvim-tree'.setup { +-- disable_netrw = true, +-- hijack_netrw = true, +-- open_on_setup = false, +-- ignore_ft_on_setup = {}, +-- open_on_tab = false, +-- hijack_cursor = false, +-- update_cwd = false, +-- diagnostics = { +-- enable = false, +-- icons = { +-- hint = "", +-- info = "", +-- warning = "", +-- error = "", +-- } +-- }, +-- update_focused_file = { +-- enable = false, +-- update_cwd = false, +-- ignore_list = {} +-- }, +-- system_open = { +-- cmd = nil, +-- args = {} +-- }, +-- filters = { +-- dotfiles = false, +-- custom = {} +-- }, +-- view = { +-- width = 30, +-- height = 30, +-- hide_root_folder = false, +-- side = 'left', +-- mappings = { +-- custom_only = false, +-- list = list, +-- } +-- } +-- } diff --git a/home/.config/nvim/lua/plugins.lua b/home/.config/nvim/lua/plugins.lua index 52e7914..f19fde0 100644 --- a/home/.config/nvim/lua/plugins.lua +++ b/home/.config/nvim/lua/plugins.lua @@ -22,7 +22,10 @@ local packer = require('packer').startup(function(use) 'nvim-lua/plenary.nvim' } } - + + -- gorbit's codewindow + use 'gorbit99/codewindow.nvim' + -- surround vim use 'tpope/vim-surround' @@ -66,25 +69,11 @@ local packer = require('packer').startup(function(use) -- better highlighting use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'} - use { - 'kyazdani42/nvim-tree.lua', - requires = 'kyazdani42/nvim-web-devicons', - config = function() require'nvim-tree'.setup {} end - } - - -- which-key - use { - "folke/which-key.nvim", - config = function() - vim.o.timeout = true - vim.o.timeoutlen = 300 - require("which-key").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - end - } + -- use { + -- 'kyazdani42/nvim-tree.lua', + -- requires = 'kyazdani42/nvim-web-devicons', + -- config = function() require'nvim-tree'.setup {} end + -- } -- prettier tabs use 'romgrk/barbar.nvim' @@ -114,7 +103,7 @@ end) -- plugin specific configs go here require('plugin-config/nvim-cmp') require('plugin-config/telescope') -require('plugin-config/nvim-tree') +-- require('plugin-config/nvim-tree') require('plugin-config/nvim-treesitter') require('plugin-config/barbar') require('plugin-config/lsp-colors') @@ -124,4 +113,4 @@ require('plugin-config/galaxyline') require('plugin-config/gitsigns') require('plugin-config/indent-guide-lines') -return packer +return packer \ No newline at end of file diff --git a/home/.config/nvim/plugin/packer_compiled.lua b/home/.config/nvim/plugin/packer_compiled.lua index 5e15e10..1a348dd 100644 --- a/home/.config/nvim/plugin/packer_compiled.lua +++ b/home/.config/nvim/plugin/packer_compiled.lua @@ -49,8 +49,8 @@ local function save_profiles(threshold) end time([[Luarocks path setup]], true) -local package_path_str = "/home/benk/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/benk/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/benk/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/benk/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" -local install_cpath_pattern = "/home/benk/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" +local package_path_str = "/home/ben/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/ben/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/ben/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/ben/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/ben/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" if not string.find(package.path, package_path_str, 1, true) then package.path = package.path .. ';' .. package_path_str end @@ -76,152 +76,142 @@ time([[Defining packer_plugins]], true) _G.packer_plugins = { ["barbar.nvim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/barbar.nvim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/barbar.nvim", url = "https://github.com/romgrk/barbar.nvim" }, ["cmp-buffer"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/cmp-buffer", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/cmp-buffer", url = "https://github.com/hrsh7th/cmp-buffer" }, ["cmp-cmdline"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/cmp-cmdline", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/cmp-cmdline", url = "https://github.com/hrsh7th/cmp-cmdline" }, ["cmp-nvim-lsp"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", url = "https://github.com/hrsh7th/cmp-nvim-lsp" }, ["cmp-path"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/cmp-path", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/cmp-path", url = "https://github.com/hrsh7th/cmp-path" }, ["cmp-vsnip"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/cmp-vsnip", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/cmp-vsnip", url = "https://github.com/hrsh7th/cmp-vsnip" }, + ["codewindow.nvim"] = { + loaded = true, + path = "/home/ben/.local/share/nvim/site/pack/packer/start/codewindow.nvim", + url = "https://github.com/gorbit99/codewindow.nvim" + }, ["galaxyline.nvim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/galaxyline.nvim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/galaxyline.nvim", url = "https://github.com/glepnir/galaxyline.nvim" }, ["gitsigns.nvim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", url = "https://github.com/lewis6991/gitsigns.nvim" }, ["indent-blankline.nvim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim", url = "https://github.com/lukas-reineke/indent-blankline.nvim" }, ["lsp-colors.nvim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/lsp-colors.nvim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/lsp-colors.nvim", url = "https://github.com/folke/lsp-colors.nvim" }, ["lsp-trouble.nvim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/lsp-trouble.nvim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/lsp-trouble.nvim", url = "https://github.com/folke/lsp-trouble.nvim" }, ["lspsaga.nvim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/lspsaga.nvim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/lspsaga.nvim", url = "https://github.com/tami5/lspsaga.nvim" }, nerdcommenter = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/nerdcommenter", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/nerdcommenter", url = "https://github.com/scrooloose/nerdcommenter" }, ["nvim-bqf"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/nvim-bqf", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-bqf", url = "https://github.com/kevinhwang91/nvim-bqf" }, ["nvim-cmp"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/nvim-cmp", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-cmp", url = "https://github.com/hrsh7th/nvim-cmp" }, ["nvim-lsp-installer"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer", url = "https://github.com/williamboman/nvim-lsp-installer" }, ["nvim-lspconfig"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", url = "https://github.com/neovim/nvim-lspconfig" }, - ["nvim-tree.lua"] = { - 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\14nvim-tree\frequire\0" }, - loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", - url = "https://github.com/kyazdani42/nvim-tree.lua" - }, ["nvim-treesitter"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/nvim-treesitter", url = "https://github.com/nvim-treesitter/nvim-treesitter" }, - ["nvim-web-devicons"] = { - loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", - url = "https://github.com/kyazdani42/nvim-web-devicons" - }, ["packer.nvim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/packer.nvim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/packer.nvim", url = "https://github.com/wbthomason/packer.nvim" }, ["palenight.vim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/palenight.vim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/palenight.vim", url = "https://github.com/drewtempelmeyer/palenight.vim" }, ["plenary.nvim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/plenary.nvim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/plenary.nvim", url = "https://github.com/nvim-lua/plenary.nvim" }, ["telescope.nvim"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/telescope.nvim", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/telescope.nvim", url = "https://github.com/nvim-telescope/telescope.nvim" }, ["vim-illuminate"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/vim-illuminate", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/vim-illuminate", url = "https://github.com/RRethy/vim-illuminate" }, ["vim-startify"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/vim-startify", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/vim-startify", url = "https://github.com/mhinz/vim-startify" }, ["vim-surround"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/vim-surround", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/vim-surround", url = "https://github.com/tpope/vim-surround" }, ["vim-vsnip"] = { loaded = true, - path = "/home/benk/.local/share/nvim/site/pack/packer/start/vim-vsnip", + path = "/home/ben/.local/share/nvim/site/pack/packer/start/vim-vsnip", url = "https://github.com/hrsh7th/vim-vsnip" } } time([[Defining packer_plugins]], false) --- Config for: nvim-tree.lua -time([[Config for nvim-tree.lua]], 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\14nvim-tree\frequire\0", "config", "nvim-tree.lua") -time([[Config for nvim-tree.lua]], false) _G._packer.inside_compile = false if _G._packer.needs_bufread == true then