junk removal
This commit is contained in:
+10
-7
@@ -2,7 +2,8 @@
|
||||
vim.cmd([[au BufRead,BufNewFile .env.* set filetype=sh]])
|
||||
-- Dockerfile file highlighting
|
||||
vim.cmd([[au BufRead,BufNewFile Dockerfile.* set filetype=dockerfile]])
|
||||
vim.cmd([[au BufWrite * normal zx]])
|
||||
-- redo folds on write
|
||||
--vim.cmd([[au BufWrite * normal zx]])
|
||||
-- jinja highlighting
|
||||
vim.cmd([[au BufRead,BufNewFile *.jinja set filetype=html]])
|
||||
|
||||
@@ -63,6 +64,8 @@ end
|
||||
|
||||
opt.termguicolors = false
|
||||
|
||||
vim.cmd([[hi CursorLine cterm=NONE ctermbg=darkgray ctermfg=white]])
|
||||
|
||||
-----------------------------------------------------
|
||||
-- DISABLE HIGHLIGHT OUTSIDE OF SEARCH AND REPLACE --
|
||||
-----------------------------------------------------
|
||||
@@ -79,12 +82,12 @@ opt.termguicolors = false
|
||||
---------------
|
||||
-- PROVIDERS --
|
||||
---------------
|
||||
local pyenv_root = vim.env.PYENV_ROOT
|
||||
if pyenv_root ~= nil then
|
||||
g.python3_host_prog = pyenv_root .. "/shims/python3"
|
||||
else
|
||||
g.python3_host_prog = "/usr/bin/python3"
|
||||
end
|
||||
--local pyenv_root = vim.env.PYENV_ROOT
|
||||
--if pyenv_root ~= nil then
|
||||
-- g.python3_host_prog = pyenv_root .. "/shims/python3"
|
||||
--else
|
||||
-- g.python3_host_prog = "/usr/bin/python3"
|
||||
--end
|
||||
|
||||
------------------
|
||||
-- ONEDARK.NVIM --
|
||||
|
||||
+23
-117
@@ -13,14 +13,15 @@ end
|
||||
vim.g.mapleader = ","
|
||||
|
||||
map("v", "<C-C>", '"+y')
|
||||
--map("n", "<Tab>", ":bnext<CR>")
|
||||
--map("n", "<S-Tab>", ":bprevious<CR>")
|
||||
map("n", "<Tab>", ":lua harpoon_bnext()<CR>")
|
||||
map("n", "<S-Tab>", ":lua harpoon_bprevious()<CR>")
|
||||
--map("n", "<esc>", ":noh<cr><esc>", { silent = true }) --After searching, pressing escape stops the highlight
|
||||
map("n", "<Tab>", ":bnext<CR>")
|
||||
map("n", "<S-Tab>", ":bprevious<CR>")
|
||||
--map("n", "<Tab>", ":lua harpoon_bnext()<CR>")
|
||||
--map("n", "<S-Tab>", ":lua harpoon_bprevious()<CR>")
|
||||
map("n", "<Esc>", ":noh<CR><Esc>", { silent = true }) --After searching, pressing escape stops the highlight
|
||||
|
||||
--map("n", "<Leader>w", [[:%s/\s\+$//e<CR>]])
|
||||
map("n", "<Leader>w", [[:%s/\s\+$//e<CR>]])
|
||||
--map("n", "<Leader>x", ":Bclose <CR>")
|
||||
map("n", "<Leader>x", ":bp|bd #<CR>")
|
||||
map("n", "<Leader>t", ":tabnew<CR>")
|
||||
|
||||
-- Move split
|
||||
@@ -29,27 +30,17 @@ map("n", "<A-Left>", "<C-W><S-H>")
|
||||
map("n", "<A-Up>", "<C-W><S-K>")
|
||||
map("n", "<A-Down>", "<C-W><S-J>")
|
||||
|
||||
--map("n", "<A-l>", "<C-W><S-L>")
|
||||
--map("n", "<A-h>", "<C-W><S-H>")
|
||||
--map("n", "<A-k>", "<C-W><S-K>")
|
||||
--map("n", "<A-j>", "<C-W><S-J>")
|
||||
|
||||
-- Split navigations
|
||||
map("n", "<C-Right>", "<C-W><C-L>")
|
||||
map("n", "<C-Left>", "<C-W><C-H>")
|
||||
map("n", "<C-Up>", "<C-W><C-K>")
|
||||
map("n", "<C-Down>", "<C-W><C-J>")
|
||||
|
||||
--map("n", "<C-l>", "<C-W><C-L>")
|
||||
--map("n", "<C-h>", "<C-W><C-H>")
|
||||
--map("n", "<C-k>", "<C-W><C-K>")
|
||||
--map("n", "<C-j>", "<C-W><C-J>")
|
||||
|
||||
-- Resize split
|
||||
--map("n", "-", "<C-W>-")
|
||||
--map("n", "+", "<C-W>+")
|
||||
--map("n", "(", "<C-W><")
|
||||
--map("n", ")", "<C-W>>")
|
||||
map("n", "-", "<C-W>-")
|
||||
map("n", "+", "<C-W>+")
|
||||
map("n", "(", "<C-W><")
|
||||
map("n", ")", "<C-W>>")
|
||||
|
||||
-- Scroll viewport
|
||||
map("n", "<S-Up>", "<C-Y>")
|
||||
@@ -58,24 +49,15 @@ map("v", "<S-Up>", "<C-Y>")
|
||||
map("v", "<S-Down>", "<C-E>")
|
||||
map("i", "<S-Up>", "<C-X><C-Y>")
|
||||
map("i", "<S-Down>", "<C-X><C-E>")
|
||||
--map("n", "<PageUp>", "<C-Y>")
|
||||
--map("n", "<PageDown>", "<C-E>")
|
||||
--map("v", "<PageUp>", "<C-Y>")
|
||||
--map("v", "<PageDown>", "<C-E>")
|
||||
--map("i", "<PageUp>", "<C-X><C-Y>")
|
||||
--map("i", "<PageDown>", "<C-X><C-E>")
|
||||
|
||||
-- Make visual yanks place the cursor back where started
|
||||
map("v", "y", "ygv<Esc>")
|
||||
|
||||
-- map Enter to switch tabs
|
||||
--map("n", "<Enter>", ":tabnext<CR>")
|
||||
--map("n", "<Backspace>", ":tabprevious<CR>")
|
||||
|
||||
-- Terminal binds
|
||||
map("t", "<Esc>", [[<C-\><C-n>]])
|
||||
map("n", [[<Leader>\]], ':split | term<CR>')
|
||||
map("n", [[<Leader>|]], ':vsplit | term<CR>')
|
||||
local term_command = "split | set norelativenumber | set nonumber | term"
|
||||
map("t", "<C-Space>", [[<C-\><C-n>]])
|
||||
map("n", [[<Leader>\]], ":" .. term_command .. "<CR>")
|
||||
map("n", [[<Leader>|]], ":v" .. term_command .. "<CR>")
|
||||
|
||||
---------
|
||||
-- HOP --
|
||||
@@ -84,74 +66,15 @@ local hop_opts = "{ create_hl_autocmd = true }"
|
||||
local hopword = [[<cmd>lua require'hop'.hint_words(]] .. hop_opts .. [[)<cr>]]
|
||||
local hopline = [[<cmd>lua require'hop'.hint_lines_skip_whitespace(]] .. hop_opts .. [[)<cr>]]
|
||||
|
||||
--map("n", "<m-l>", hopline, {silent = true})
|
||||
--map("v", "<m-l>", hopline, {silent = true})
|
||||
--map("n", "<m-w>", hopword, {silent = true})
|
||||
--map("v", "<m-w>", hopword, {silent = true})
|
||||
|
||||
map("n", "W", hopline, { silent = true })
|
||||
map("v", "W", hopline, { silent = true })
|
||||
map("n", "w", hopword, { silent = true })
|
||||
map("v", "w", hopword, { silent = true })
|
||||
|
||||
-- args: direction: bool, inclusive: bool
|
||||
-- inclusive is broken in hop as of this comment
|
||||
--local hop_hint_char1 = function(args)
|
||||
-- local direction = args.forward and "AFTER_CURSOR" or "BEFORE_CURSOR"
|
||||
-- local inclusive = args.inclusive and "true" or "false"
|
||||
--
|
||||
-- return ("<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection." ..
|
||||
-- direction .. ", current_line_only = true, inclusive_jump = " .. inclusive .. " })<cr>")
|
||||
--end
|
||||
--
|
||||
--vim.api.nvim_set_keymap("", "f", hop_hint_char1({forward = true, inclusive = false}), {})
|
||||
--vim.api.nvim_set_keymap("", "F", hop_hint_char1({forward = false, inclusive = false}), {})
|
||||
--vim.api.nvim_set_keymap("", "t", hop_hint_char1({forward = true, inclusive = false}), {})
|
||||
--vim.api.nvim_set_keymap("", "T", hop_hint_char1({forward = false, inclusive = false}), {})
|
||||
|
||||
-- place this in one of your configuration file(s)
|
||||
--vim.api.nvim_set_keymap(
|
||||
-- "n",
|
||||
-- "f",
|
||||
-- "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true })<cr>",
|
||||
-- {}
|
||||
--)
|
||||
--vim.api.nvim_set_keymap(
|
||||
-- "n",
|
||||
-- "F",
|
||||
-- "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true })<cr>",
|
||||
-- {}
|
||||
--)
|
||||
--vim.api.nvim_set_keymap(
|
||||
-- "",
|
||||
-- "f",
|
||||
-- "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true, inclusive_jump = true })<cr>",
|
||||
-- {}
|
||||
--)
|
||||
--vim.api.nvim_set_keymap(
|
||||
-- "",
|
||||
-- "F",
|
||||
-- "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true, inclusive_jump = true })<cr>",
|
||||
-- {}
|
||||
--)
|
||||
--vim.api.nvim_set_keymap(
|
||||
-- "",
|
||||
-- "t",
|
||||
-- "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true })<cr>",
|
||||
-- {}
|
||||
--)
|
||||
--vim.api.nvim_set_keymap(
|
||||
-- "",
|
||||
-- "T",
|
||||
-- "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true })<cr>",
|
||||
-- {}
|
||||
--)
|
||||
|
||||
---------
|
||||
-- FZF --
|
||||
---------
|
||||
map("n", "<Leader>o", ":Files<CR>")
|
||||
--map("n", "<Leader>O", [[:lua vim.fn['fzf#vim#files']('~/')<CR>]])
|
||||
map("n", "<Leader>O", ":Files ~/<CR>")
|
||||
map("n", "<Leader>p", ":Buffers<CR>")
|
||||
map("n", "<Leader>h", ":Helptags<CR>")
|
||||
@@ -160,7 +83,6 @@ map("n", "<Leader>c", ":Commands<CR>")
|
||||
map("n", "<Leader>r", ":Rg <C-R><C-W><CR>")
|
||||
map("n", "<Leader>R", ":Rg<CR>")
|
||||
map("n", "<Leader>s", ":Lines<CR>")
|
||||
--map("n", "<Leader>[", ":Windows <CR>")
|
||||
|
||||
map("n", "<Leader>gf", ":GFiles<CR>")
|
||||
map("n", "<Leader>gn", ":GFiles?<CR>")
|
||||
@@ -171,42 +93,26 @@ map("n", "<Leader>gc", ":Commits<CR>")
|
||||
------------------
|
||||
map("n", "<Leader>gb", ":GBranches<CR>")
|
||||
|
||||
---------
|
||||
-- ALE --
|
||||
---------
|
||||
--map("n", "<c-k>", ":ALEPreviousWrap <CR>", {silent = true})
|
||||
--map("n", "<c-j>", ":ALENextWrap <CR>", {silent = true})
|
||||
--map("n", "<space>f", ":ALEFix<CR>", {silent = true})
|
||||
|
||||
-------------
|
||||
-- HARPOON --
|
||||
-------------
|
||||
|
||||
--map("n", "<Leader>m", [[:lua require("harpoon.mark").add_file() <CR>]])
|
||||
map("n", "<Leader>x", ":lua harpoon_rm_file()<CR>")
|
||||
map("n", "<Leader>ma", [[:lua harpoon_toggle_file()<CR>]])
|
||||
map("n", "<Leader>mc", [[:lua harpoon_clear_all()<CR>]])
|
||||
map("n", "<Leader>ml", [[:lua require("harpoon.ui").toggle_quick_menu()<CR>]])
|
||||
map("n", "<Leader>mt", [[:lua harpoon_btoggle()<CR>]])
|
||||
--map("n", "<Leader>x", ":lua harpoon_rm_file()<CR>")
|
||||
--map("n", "<Leader>ma", [[:lua harpoon_toggle_file()<CR>]])
|
||||
--map("n", "<Leader>mc", [[:lua harpoon_clear_all()<CR>]])
|
||||
--map("n", "<Leader>ml", [[:lua require("harpoon.ui").toggle_quick_menu()<CR>]])
|
||||
--map("n", "<Leader>mt", [[:lua harpoon_btoggle()<CR>]])
|
||||
|
||||
--map("n", "<Leader>n", [[:lua require("harpoon.ui").nav_next() <CR>]])
|
||||
--map("n", "<Leader>N", [[:lua require("harpoon.ui").nav_prev() <CR>]])
|
||||
|
||||
-----------
|
||||
-- CODEX --
|
||||
-----------
|
||||
--local create_completion = ":lua vim.fn.CreateCompletion(200)<CR>"
|
||||
--local create_completion = ":lua vim.fn.CreateCompletionLine()<CR>"
|
||||
--map("n", "<C-x>", create_completion)
|
||||
--map("i", "<C-x>", ("<C-o>" .. create_completion))
|
||||
--map("i", "<C-x>", "<Esc>li<C-g>u<Esc>l:CreateCompletion<CR>")
|
||||
|
||||
--------------
|
||||
-- NVIM FZF --
|
||||
--------------
|
||||
map("n", "<Leader>mm", [[:lua fzf_buffer_add_to_harpoon()<CR>]])
|
||||
map("n", "<Leader>mo", [[:lua fzf_files_to_harpoon()<CR>]])
|
||||
map("n", "<Leader>ml", [[:lua fzf_select_harpoon_mark()<CR>]])
|
||||
--map("n", "<Leader>mm", [[:lua fzf_buffer_add_to_harpoon()<CR>]])
|
||||
--map("n", "<Leader>mo", [[:lua fzf_files_to_harpoon()<CR>]])
|
||||
--map("n", "<Leader>ml", [[:lua fzf_select_harpoon_mark()<CR>]])
|
||||
|
||||
-- RNVIMR
|
||||
-- https://github.com/kevinhwang91/rnvimr
|
||||
|
||||
+3
-21
@@ -1,6 +1,6 @@
|
||||
local use = require("packer").use
|
||||
|
||||
require("packer").startup(function()
|
||||
local use = require("packer").use
|
||||
|
||||
use("wbthomason/packer.nvim")
|
||||
|
||||
-- OPENAI CODEX
|
||||
@@ -29,8 +29,6 @@ require("packer").startup(function()
|
||||
-- FILE MANAGEMENT
|
||||
use("junegunn/fzf")
|
||||
use("junegunn/fzf.vim")
|
||||
use("rbgrouleff/bclose.vim")
|
||||
--use("francoiscabrol/ranger.vim")
|
||||
use("kevinhwang91/rnvimr")
|
||||
use("vijaymarupudi/nvim-fzf")
|
||||
use("vijaymarupudi/nvim-fzf-commands")
|
||||
@@ -48,10 +46,6 @@ require("packer").startup(function()
|
||||
|
||||
-- EDITOR
|
||||
use("windwp/nvim-autopairs")
|
||||
--use "jiangmiao/auto-pairs"
|
||||
--use "dense-analysis/ale"
|
||||
--use "nathanmsmith/nvim-ale-diagnostic"
|
||||
use("turbio/bracey.vim")
|
||||
use("lukas-reineke/indent-blankline.nvim")
|
||||
--use "sheerun/vim-polyglot"
|
||||
|
||||
@@ -61,7 +55,6 @@ require("packer").startup(function()
|
||||
|
||||
-- LSP
|
||||
use("hrsh7th/nvim-cmp") -- Autocompletion plugin
|
||||
--use "saadparwaiz1/cmp_luasnip" -- Snippets source for nvim-cmp
|
||||
use("p00f/nvim-ts-rainbow")
|
||||
use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
|
||||
use("nvim-treesitter/nvim-treesitter-context")
|
||||
@@ -85,12 +78,10 @@ require("packer").startup(function()
|
||||
use("chemzqm/vim-jsx-improve")
|
||||
use("yuezk/vim-js") -- js
|
||||
use("maxmellon/vim-jsx-pretty") -- react/tsx syntax highlight & indent
|
||||
--use "leafOfTree/vim-vue-plugin" -- vue syntax highlight & indent
|
||||
|
||||
-- PYTHON
|
||||
--use {"numirias/semshi", run = ":UpdateRemotePlugins"} -- python
|
||||
use("Vimjas/vim-python-pep8-indent")
|
||||
--use("petobens/poet-v")
|
||||
--use("Vimjas/vim-python-pep8-indent")
|
||||
|
||||
-- HTML/CSS
|
||||
use("mattn/emmet-vim")
|
||||
@@ -104,15 +95,6 @@ require("packer").startup(function()
|
||||
})
|
||||
end,
|
||||
})
|
||||
--use({
|
||||
-- "olimorris/persisted.nvim",
|
||||
-- config = function()
|
||||
-- require("persisted").setup({
|
||||
-- use_git_branch = true,
|
||||
-- autoload = true,
|
||||
-- })
|
||||
-- end,
|
||||
--})
|
||||
|
||||
-- ZIG
|
||||
use("ziglang/zig.vim")
|
||||
|
||||
Reference in New Issue
Block a user