diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc index 1f36a69..1fd422d 100755 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -42,7 +42,7 @@ bspc config presel_feedback_color "$(get_xrdb color6)" bspc rule -a mpv state=floating bspc rule -a pentablet state=floating bspc rule -a Alacritty:flota state=floating -bspc rule -a firefox:Browser state=floating +bspc rule -a Firefox:Browser state=floating bspc rule -a Firefox:Navigator state=tiled desktop='^6' bspc rule -a Zathura state=tiled bspc rule -a Borderlands2 state=fullscreen diff --git a/git/config b/git/config index c491224..620dece 100644 --- a/git/config +++ b/git/config @@ -11,8 +11,8 @@ full = show --format=fuller noed = commit --amend --no-edit tr = log --graph --date-order --date=short --pretty=format:'%C(cyan)%h %C(blue)%ar%C(auto)%d %C(yellow)%s%+b %C(black)%ae' - fz = !sha=$( git -c color.ui=always log --oneline -n 1000 | fzf +s --no-multi --prompt 'Fixup> ' ) && git commit --fixup "${sha%% *}" - fr = !sha=$( git -c color.ui=always log --oneline -n 1000 | fzf +s --no-multi --prompt 'Revert> ' ) && git revert "${sha%% *}" + fz = !sha=$( git -c color.ui=auto log --oneline -n 1000 | fzf +s --no-multi --prompt 'Fixup> ' ) && git commit --fixup "${sha%% *}" + fr = !sha=$( git -c color.ui=auto log --oneline -n 1000 | fzf +s --no-multi --prompt 'Revert> ' ) && git revert "${sha%% *}" wd = "!f() { git --paginate diff --dirstat=cumulative,files,0 ${1:-HEAD} | awk '{print $2}' | cut -d / -f1-${2:-4} | sort | uniq; }; f" [http] @@ -39,7 +39,7 @@ [delta] side-by-side = false line-numbers = true - syntax-theme = gruvbox + syntax-theme = gruvbox-dark hunk-header-style = omit file-style = blue file-decoration-style = blue ul ol @@ -90,7 +90,7 @@ diff = auto status = auto branch = auto - ui = true + ui = auto [rerere] enabled = true @@ -99,7 +99,6 @@ lineNumber = true extendRegexp = true - [gpg] program = gpg2 diff --git a/lf/lfrc b/lf/lfrc index 11c30b2..916a9e0 100644 --- a/lf/lfrc +++ b/lf/lfrc @@ -190,13 +190,6 @@ cmd yes_preview :{{ map ~ no_preview }} -cmd newfold ${{ - set -f - read newd - mkdir -- "$newd" - mv -- $fx "$newd" -}} - cmd yank-dirname $dirname -- "$f" | head -c-1 | xclip -i -selection clipboard cmd yank-path $printf '%s' "$fx" | xclip -i -selection clipboard cmd yank-basename $basename -a -- $fx | head -c-1 | xclip -i -selection clipboard @@ -274,8 +267,7 @@ map Y %cp -ri $fs . map D %mv -i $fs . map zf $file-roller "$f" map zc $zip -9 -r "$f".cbz $f -map zx $zu "$f" -map zn newfold +map zx $zx "$f" map I push A # at the very beginning map A rename # at the very end map i push A # at the very beginning diff --git a/nvim/init.lua b/nvim/init.lua index d374c85..1182a77 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -15,7 +15,7 @@ end packer.init({ enable = true, - threshold= 0, + threshold = 0, display = { open_fn = function() return require("packer.util").float({ border = "single" }) @@ -25,36 +25,40 @@ packer.init({ return packer.startup({ function(use) - use({ "wbthomason/packer.nvim" }) + use("nvim-lua/plenary.nvim") use({ "lewis6991/impatient.nvim", config = function() - require("impatient") + require("impatient").enable_profile() end, }) + use({ "wbthomason/packer.nvim" }) use({ "nathom/filetype.nvim" }) - use("nvim-lua/plenary.nvim") use({ "ellisonleao/gruvbox.nvim" }) - use({ "kyazdani42/nvim-web-devicons", + use({ "kyazdani42/nvim-web-devicons" }) + use({ + "nvim-telescope/telescope.nvim", config = function() - require("plugins.icons") + require("plugins.telescope") + end, + }) + use({ "nvim-telescope/telescope-file-browser.nvim" }) + use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }) + use({ + "norcalli/nvim-colorizer.lua", + event = "BufRead", + config = function() + require("plugins.colorizer") end, }) use({ "nvim-treesitter/nvim-treesitter", + event = { "BufRead", "BufNewFile" }, run = ":TSUpdate", config = function() require("plugins.treesitter") end, }) - use({ - "norcalli/nvim-colorizer.lua", - event = "BufReadPre", - config = function() - require("plugins.colorizer") - end, - }) - use({ "tpope/vim-fugitive", opt = true, cmd = { "Git", "Gdiff", "Gblame", "Glog", "Git mergetool" } }) use({ "lewis6991/gitsigns.nvim", event = "BufReadPre", @@ -62,65 +66,57 @@ return packer.startup({ require("plugins.gitsigns_nvim") end, }) - use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" }) - use({ "nvim-telescope/telescope-file-browser.nvim" }) - use({ - "nvim-telescope/telescope.nvim", - config = function() - require("plugins.telescope") - end, - }) - use({ - "numToStr/Comment.nvim", - event = "BufRead", - config = function() - require("Comment").setup() - end, - }) + use({ "tpope/vim-fugitive", opt = true, cmd = { "Git", "Gdiff", "Gblame", "Glog", "Git mergetool" } }) use({ "neovim/nvim-lspconfig", config = function() require("plugins.lsp.lsp-config") end, - requires = { "ray-x/lsp_signature.nvim", "hrsh7th/cmp-nvim-lsp" }, }) + use({ "ray-x/lsp_signature.nvim", after = "nvim-lspconfig" }) use({ "jose-elias-alvarez/null-ls.nvim", - after = "nvim-lspconfig", config = function() require("plugins.lsp.null-ls") end, }) + use({ "rafamadriz/friendly-snippets", module = "cmp_nvim_lsp", event = "InsertEnter" }) use({ - { - "hrsh7th/nvim-cmp", - config = function() - require("plugins.lsp.nvim-cmp") - end, - requires = { - { - "L3MON4D3/LuaSnip", - config = function() - require("plugins.lsp.luasnip") - end, - requires = { "rafamadriz/friendly-snippets" }, - }, - }, - }, - { "hrsh7th/cmp-path", after = "nvim-cmp" }, - { "hrsh7th/cmp-buffer", after = "nvim-cmp" }, - { "f3fora/cmp-spell", after = "nvim-cmp" }, - { "hrsh7th/cmp-nvim-lua", after = "nvim-cmp" }, - { "saadparwaiz1/cmp_luasnip", after = "LuaSnip"}, - { "hrsh7th/cmp-nvim-lsp-signature-help", after = "lsp_signature.nvim" }, + "hrsh7th/nvim-cmp", + after = "friendly-snippets", + config = function() + require("plugins.lsp.nvim-cmp") + end, }) + use({ "f3fora/cmp-spell", after = "nvim-cmp" }) + use({ + "L3MON4D3/LuaSnip", + wants = "friendly-snippets", + after = "nvim-cmp", + config = function() + require("plugins.lsp.luasnip") + end, + }) + use({ "saadparwaiz1/cmp_luasnip", after = "LuaSnip" }) + use({ "hrsh7th/cmp-nvim-lua", after = "cmp_luasnip" }) + use({ "hrsh7th/cmp-nvim-lsp", after = "cmp-nvim-lua" }) + use({ "hrsh7th/cmp-buffer", after = "cmp-nvim-lsp" }) + use({ "hrsh7th/cmp-path", after = "cmp-buffer" }) + use({ "hrsh7th/cmp-nvim-lsp-signature-help", after = "cmp-path" }) use({ "windwp/nvim-autopairs", - event = "InsertCharPre", after = "nvim-cmp", config = function() require("plugins.autopairs") end, }) + use({ + "numToStr/Comment.nvim", + module = "Comment", + keys = { "gc", "gb" }, + config = function() + require("Comment").setup() + end, + }) end, }) diff --git a/nvim/lua/plugins/gitsigns_nvim.lua b/nvim/lua/plugins/gitsigns_nvim.lua index 632e00a..171ae9a 100644 --- a/nvim/lua/plugins/gitsigns_nvim.lua +++ b/nvim/lua/plugins/gitsigns_nvim.lua @@ -2,13 +2,13 @@ require("gitsigns").setup({ signcolumn = true, current_line_blame_opts = { delay = 2000, virt_text_pos = "right_align" }, signs = { - add = { hl = "GitSignsAdd", text = "┃", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, - change = { hl = "GitSignsChange", text = "┃", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, - delete = { hl = "GitSignsDelete", text = "╏", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, - topdelete = { hl = "GitSignsDelete", text = "┯", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, + add = { hl = "GitSignsAdd", text = "│", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" }, + change = { hl = "GitSignsChange", text = "│", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, + delete = { hl = "GitSignsDelete", text = "┆", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, + topdelete = { hl = "GitSignsDelete", text = "┬", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" }, changedelete = { hl = "GitSignsChange", - text = "╍", + text = "┴", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn", }, diff --git a/nvim/lua/plugins/icons.lua b/nvim/lua/plugins/icons.lua index bbc98c6..3ca750a 100644 --- a/nvim/lua/plugins/icons.lua +++ b/nvim/lua/plugins/icons.lua @@ -4,94 +4,102 @@ if not ok then return end -web_devicons.setup { +web_devicons.setup({ override = { + default_icon = { + icon = " ", + name = "Default", + }, + zsh = { + icon = " ", + name = "Zsh", + }, + c = { + icon = " ", + name = "c", + }, html = { - icon = "", + icon = " ", name = "html", }, css = { - icon = "", + icon = " ", name = "css", }, scss = { - icon = "", + icon = " ", name = "scss", }, sass = { - icon = "", + icon = " ", name = "sass", }, js = { - icon = "", + icon = " ", name = "js", }, ts = { - icon = "ﯤ", + icon = " ", name = "ts", }, - kt = { - icon = "󱈙", - name = "kt", - }, png = { - icon = "", + icon = " ", name = "png", }, jpg = { - icon = "", + icon = " ", name = "jpg", }, jpeg = { - icon = "", + icon = " ", name = "jpeg", }, mp3 = { - icon = "", + icon = " ", name = "mp3", }, mp4 = { - icon = "", + icon = " ", name = "mp4", }, out = { - icon = "", + icon = " ", name = "out", }, rb = { - icon = "", + icon = " ", name = "rb", }, vue = { - icon = "﵂", + icon = "﵂ ", name = "vue", }, py = { - icon = "", + icon = " ", name = "py", }, toml = { - icon = "", + icon = " ", name = "toml", }, lock = { - icon = "", + icon = " ", name = "lock", }, zip = { - icon = "", + icon = " ", name = "zip", }, xz = { - icon = "", + icon = " ", name = "xz", }, deb = { - icon = "", + icon = " ", name = "deb", }, rpm = { - icon = "", + icon = " ", name = "rpm", }, lua = { @@ -99,111 +107,111 @@ web_devicons.setup { name = "lua", }, txt = { - icon = "", + icon = " ", name = "txt", }, md = { - icon = "", + icon = " ", name = "markdown", }, graphql = { - icon = "", + icon = " ", name = "graphql", }, env = { - icon = "", + icon = " ", name = "dotenvexample", }, [".env.production"] = { - icon = "", + icon = " ", name = "envprod", }, [".env.development"] = { - icon = "", + icon = " ", name = "envdev", }, [".env.testing"] = { - icon = "", + icon = " ", name = "envtest", }, [".env.example"] = { - icon = "", + icon = " ", name = "dotenvexample", }, [".env"] = { - icon = "", + icon = " ", name = "dotenv", }, ["docker-compose.yml"] = { - icon = "", + icon = " ", name = "dockercompose", }, [".dockerignore"] = { - icon = "", + icon = " ", name = "dockerignore", }, [".prettierignore"] = { - icon = "", + icon = " ", name = "prettierignore", }, [".prettierrc"] = { - icon = "", + icon = " ", name = "prettier", }, [".prettierrc.json"] = { - icon = "", + icon = " ", name = "prettierjson", }, [".prettierrc.js"] = { - icon = "", + icon = " ", name = "prettierrcjs", }, ["prettier.config.js"] = { - icon = "", + icon = " ", name = "prettierjsconfig", }, [".prettier.yaml"] = { - icon = "", + icon = " ", name = "prettieryaml", }, ["test.js"] = { - icon = "", + icon = " ", name = "javascripttest", }, ["test.jsx"] = { - icon = "", + icon = " ", name = "reactrest", }, ["test.ts"] = { - icon = "", + icon = " ", name = "typescripttest", }, ["test.tsx"] = { - icon = "", + icon = " ", name = "reacttypescripttest", }, ["spec.js"] = { - icon = "", + icon = " ", name = "javascriptspectest", }, ["spec.jsx"] = { - icon = "", + icon = " ", name = "reactspectest", }, ["spec.ts"] = { - icon = "", + icon = " ", name = "typescriptspectest", }, ["spec.tsx"] = { - icon = "", + icon = " ", name = "reacttypescriptspectest", }, ["yarn-error.log"] = { - icon = "", + icon = " ", name = "yarnerrorlog", }, ["yarn.lock"] = { - icon = "", + icon = " ", name = "yarnlock", }, ["package.json"] = { @@ -211,37 +219,45 @@ web_devicons.setup { name = "npm_packagejson", }, [".gitignore"] = { - icon = "", + icon = " ", name = "gitignore", }, [".gitattributes"] = { - icon = "", + icon = " ", name = "gitattributes", }, ["Dockerfile"] = { - icon = "", + icon = " ", name = "dockerfilex", }, [".nvmrc"] = { - icon = "", + icon = " ", name = "nvmrc", }, [".eslintrc.js"] = { - icon = "ﯶ", + icon = "ﯶ ", name = "eslintrcjs", }, [".travis.yml"] = { - icon = "", + icon = " ", name = "travis", }, ["babel.config.js"] = { - icon = "", + icon = " ", name = "babelconfig", }, [".commitlintrc.json"] = { - icon = "ﰚ", + icon = "ﰚ ", name = "commitlinrcjson", }, + woff = { + icon = " ", + name = "WebOpenFontFormat", + }, + woff2 = { + icon = " ", + name = "WebOpenFontFormat2", + }, }, default = true, -} +}) diff --git a/nvim/lua/plugins/lsp/lsp-config.lua b/nvim/lua/plugins/lsp/lsp-config.lua index a88cd62..396c772 100644 --- a/nvim/lua/plugins/lsp/lsp-config.lua +++ b/nvim/lua/plugins/lsp/lsp-config.lua @@ -44,15 +44,12 @@ end lsconf.sumneko_lua.setup({ cmd = { sumneko_binary, "-E", sumneko_root_path .. "/main.lua" }, - flags = flags, - capabilities = capabilities, - on_attach = on_attach, - handlers = handlers, settings = { Lua = { completion = { enable = true, - showWord = "Disable", + keywordSnippet = "Replace", + callSnippet = "Replace", }, runtime = { version = "LuaJIT", @@ -62,7 +59,13 @@ lsconf.sumneko_lua.setup({ globals = { "vim" }, }, workspace = { - library = vim.api.nvim_get_runtime_file("", true), + library = { + [vim.fn.expand("$VIMRUNTIME/lua")] = true, + [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true, + [vim.fn.stdpath("config") .. "/lua"] = true, + }, + maxPreload = 100000, + preloadFileSize = 10000, }, telemetry = { enable = false, @@ -72,10 +75,6 @@ lsconf.sumneko_lua.setup({ }) require("lspconfig/configs").ls_emmet = { - flags = flags, - capabilities = capabilities, - on_attach = on_attach, - handlers = handlers, default_config = { cmd = { "ls_emmet", "--stdio" }, filetypes = { @@ -97,7 +96,7 @@ require("lspconfig/configs").ls_emmet = { }, } -local servers = { "html", "cssls", "tailwindcss", "vimls", "jsonls" } +local servers = { "sumneko_lua", "ls_emmet", "html", "cssls", "tailwindcss", "vimls", "jsonls" } for _, lsp in ipairs(servers) do lsconf[lsp].setup({ on_attach = on_attach, diff --git a/nvim/lua/plugins/lsp/nvim-cmp.lua b/nvim/lua/plugins/lsp/nvim-cmp.lua index 3b8e9f2..6ecada2 100644 --- a/nvim/lua/plugins/lsp/nvim-cmp.lua +++ b/nvim/lua/plugins/lsp/nvim-cmp.lua @@ -1,5 +1,5 @@ local cmp_kinds = { - Text = " ", + Text = " ", Method = " ", Function = " ", Constructor = " ", @@ -27,23 +27,21 @@ local cmp_kinds = { } local has_words_before = function() - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end -local luasnip = require("luasnip") local cmp = require("cmp") cmp.setup({ - enabled = function() - -- disable completion in comments - local context = require 'cmp.config.context' - -- keep command mode completion enabled when cursor is in a comment - if vim.api.nvim_get_mode().mode == 'c' then - return true - else - return not context.in_treesitter_capture("comment") - and not context.in_syntax_group("Comment") - end - end, + enabled = function() + -- disable completion in comments + local context = require("cmp.config.context") + -- keep command mode completion enabled when cursor is in a comment + if vim.api.nvim_get_mode().mode == "c" then + return true + else + return not context.in_treesitter_capture("comment") and not context.in_syntax_group("Comment") + end + end, snippet = { expand = function(args) require("luasnip").lsp_expand(args.body) @@ -70,31 +68,32 @@ cmp.setup({ select = true, }), [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_locally_jumpable() then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") + if cmp.visible() then + cmp.select_next_item() + elseif require("luasnip").expand_or_locally_jumpable() then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-expand-or-jump", true, true, true), "") elseif has_words_before() then cmp.complete() - else - fallback() - end - end, { "i", "s" }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") - else - fallback() - end - end, {"i", "s"}), + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif require("luasnip").jumpable(-1) then + vim.fn.feedkeys(vim.api.nvim_replace_termcodes("luasnip-jump-prev", true, true, true), "") + else + fallback() + end + end, { "i", "s" }), }, sources = cmp.config.sources({ - { name = "luasnip", max_item_count = 5 }, - { name = "nvim_lsp", max_item_count = 5 }, - { name = "path", max_item_count = 10 }, - { name = "buffer", max_item_count = 10 }, - { name = "nvim_lsp_signature_help" }, + { name = "nvim_lsp", max_item_count = 20, priority_weight = 100 }, + { name = "luasnip", priority_weight = 120 }, + { name = "buffer", max_item_count = 5, priority_weight = 80 }, + { name = "path", max_item_count = 10, priority_weight = 100 }, + { name = "nvim_lsp_signature_help" }, }), + view = { entries = "native" }, }) diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua index 295bc0e..ebb32d2 100644 --- a/nvim/lua/plugins/telescope.lua +++ b/nvim/lua/plugins/telescope.lua @@ -3,7 +3,7 @@ local previewers = require("telescope.previewers") local builtin = require("telescope.builtin") require("telescope").setup({ - defaults = require("telescope.themes").get_ivy({ + defaults = { dynamic_preview_title = true, vimgrep_arguments = { "rg", @@ -19,28 +19,11 @@ require("telescope").setup({ filesize_limit = 5, timeout = 150, treesitter = true, - title = false, }, borderchars = { " ", " ", " ", " ", " ", " ", " ", " " }, - sorting_strategy = "ascending", layout_config = { prompt_position = "top", }, - pickers = { - buffers = { - mappings = { - n = { - ["d"] = actions.delete_buffer, - }, - }, - sort_mru = true, - sort_lastused = true, - }, - find_files = { - find_command = { "fd", "--type", "f", "-c always", "-H", "--strip-cwd-prefix" }, - hidden = true, - }, - }, prompt_prefix = "  ", selection_caret = " → ", entry_prefix = " ", @@ -53,16 +36,58 @@ require("telescope").setup({ [""] = actions.select_default + actions.center, [""] = actions.close, [""] = actions.toggle_selection + actions.move_selection_next, - [""] = require("telescope.actions.layout").toggle_preview, }, }, - extensions = { - file_browser = { - hidden = true, - theme = "ivy", + }, + pickers = { + buffers = { + theme = "dropdown", + results_height = 20, + initial_mode = "normal", + borderchars = { " ", " ", " ", " ", " ", " ", " ", " " }, + previewer = false, + disable_devicons = true, + mappings = { + n = { + ["d"] = actions.delete_buffer, + }, }, + sort_mru = true, + sort_lastused = true, + ignore_current_buffer = true, }, - }), + find_files = { + find_command = { "fd", "--type", "f", "-c always", "-H", "--strip-cwd-prefix" }, + hidden = true, + }, + }, + extensions = { + file_browser = { + hidden = true, + hijack_netrw = true, + theme = "ivy", + borderchars = { " ", " ", " ", " ", " ", " ", " ", " " }, + grouped = true, + initial_mode = "normal", + sorting_strategy = "ascending", + }, + }, +}) + +local delta_bcommits = previewers.new_termopen_previewer({ + get_command = function(entry) + return { + "git", + "-c", + "core.pager=delta", + "-c", + "delta.side-by-side=false", + "diff", + entry.value .. "^!", + "--", + entry.current_file, + } + end, }) local delta = previewers.new_termopen_previewer({ @@ -84,7 +109,7 @@ end Delta_git_bcommits = function(opts) opts = opts or {} opts.previewer = { - delta, + delta_bcommits, previewers.git_commit_message.new(opts), previewers.git_commit_diff_as_was.new(opts), } @@ -93,9 +118,9 @@ end Project_files = function() local opts = { show_untracked = false } -- define here if you want to define something - local ok = pcall(require("telescope.builtin").git_files, opts) + local ok = pcall(builtin.git_files, opts) if not ok then - require("telescope.builtin").find_files(opts) + builtin.find_files(opts) end end @@ -105,13 +130,13 @@ vim.api.nvim_set_keymap("n", "", "lua Project_files()", default_opt vim.api.nvim_set_keymap( "n", "", - ":lua require'telescope'.extensions.file_browser.file_browser({path = vim.fn.expand('%:p:h')})", + "lua require'telescope'.extensions.file_browser.file_browser({path = vim.fn.expand('%:p:h')})", default_opts ) vim.api.nvim_set_keymap("n", "", "Telescope buffers", default_opts) +vim.api.nvim_set_keymap("n", "", "lua Delta_git_commits()", default_opts) +vim.api.nvim_set_keymap("n", "", "lua Delta_git_bcommits()", default_opts) vim.api.nvim_set_keymap("n", "", "Telescope live_grep", default_opts) -vim.api.nvim_set_keymap("n", "", "Telescope git_commits", default_opts) vim.api.nvim_set_keymap("n", "", "Telescope resume", default_opts) - require("telescope").load_extension("fzf") require("telescope").load_extension("file_browser") diff --git a/nvim/plugin/color.vim b/nvim/plugin/color.vim index aee9ee1..ce7d0d2 100644 --- a/nvim/plugin/color.vim +++ b/nvim/plugin/color.vim @@ -1,14 +1,14 @@ colorscheme gruvbox hi! Normal ctermbg=NONE guibg=NONE hi! NonText ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE -hi! SignColumn ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE +" hi! SignColumn ctermbg=NONE guibg=NONE guifg=NONE ctermfg=NONE hi! LspDiagnosticsLineNrError guibg=#51202A guifg=#FF0000 gui=bold hi! LspDiagnosticsLineNrWarning guibg=#51412A guifg=#FFA500 gui=bold hi! LspDiagnosticsLineNrInformation guibg=#1E535D guifg=#00FFFF gui=bold hi! LspDiagnosticsLineNrHint guibg=#1E205D guifg=#008bbd gui=bold hi! TelescopeNormal guibg=#000000 -highlight default link TelescopePromptPrefix TelescopeNormal -highlight default link TelescopePromptCounter TelescopeNormal +hi! default link TelescopePromptPrefix TelescopeNormal +hi! default link TelescopePromptCounter TelescopeNormal " gray highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080 diff --git a/nvim/plugin/disabled.lua b/nvim/plugin/disabled.lua index e645488..925e0cd 100644 --- a/nvim/plugin/disabled.lua +++ b/nvim/plugin/disabled.lua @@ -13,6 +13,10 @@ local disabled_builtin_plugins = { "logipat", "rrhelper", "matchit", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", } for _, plugin in pairs(disabled_builtin_plugins) do diff --git a/nvim/plugin/mappings/normal.vim b/nvim/plugin/mappings/normal.vim index a5914af..4add639 100644 --- a/nvim/plugin/mappings/normal.vim +++ b/nvim/plugin/mappings/normal.vim @@ -55,8 +55,8 @@ nnoremap N nzzzv nnoremap J mzJ`z " Shift lines up and down -nnoremap j :m .+1== -nnoremap k :m .-2== +nnoremap :m .+1== +nnoremap :m .-2== " j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k nnoremap j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' diff --git a/nvim/plugin/settings.vim b/nvim/plugin/settings.vim index 4205aa4..687e0f6 100644 --- a/nvim/plugin/settings.vim +++ b/nvim/plugin/settings.vim @@ -38,11 +38,12 @@ set wildignore+=**/coverage/* set wildignore+=**/node_modules/* set wildignore+=**/.git/* -let g:netrw_browse_split = 0 -let g:netrw_banner = 0 -let g:netrw_keepdir = 0 -let g:netrw_winsize = 25 -let g:netrw_liststyle = 3 -let g:netrw_localrmdir='rm -r' -let g:netrw_localcopydircmd = 'cp -r' -nnoremap :Vex! +" Superceded by telescope file browser plugin +" let g:netrw_browse_split = 0 +" let g:netrw_banner = 0 +" let g:netrw_keepdir = 0 +" let g:netrw_winsize = 25 +" let g:netrw_liststyle = 3 +" let g:netrw_localrmdir='rm -r' +" let g:netrw_localcopydircmd = 'cp -r' +" nnoremap :Vex! diff --git a/zsh/conf/03_aliases.zsh b/zsh/conf/03_aliases.zsh index 5f992ca..1b8b9b5 100644 --- a/zsh/conf/03_aliases.zsh +++ b/zsh/conf/03_aliases.zsh @@ -6,6 +6,7 @@ alias \ z='zathura' \ g='git' \ vv='nvi' \ + bc='bc -iq' \ se='doas nvim' \ am='alsamixer' \ pm='pulsemixer' \