the purge

This commit is contained in:
Zynh0722 2023-05-12 04:14:03 -07:00
parent 0c5ace51d4
commit d77e487540
20 changed files with 0 additions and 444 deletions

View file

@ -1,2 +0,0 @@
-- vim.keymap.set('n', "<C-o>", vim.cmd("mfmx"), { buffer = true })
-- attempt to open in external file explorer I think

View file

@ -1,6 +0,0 @@
-- Enable Comment.nvim
require('Comment').setup({
options = {
theme = 'rose-pine'
}
})

View file

@ -1,2 +0,0 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git, { desc = "Open Git Fugitive" })
vim.keymap.set("n", "<leader>fo", function() vim.cmd('Git pull') end, { desc = "Git pull" })

View file

@ -1,11 +0,0 @@
-- Gitsigns
-- See `:help gitsigns.txt`
require('gitsigns').setup {
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
}

View file

@ -1,10 +0,0 @@
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
vim.keymap.set("n", "<leader>a", mark.add_file, { desc = "Harpoon add file" })
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu, { desc = "Harpoon quick menu" })
vim.keymap.set("n", "<C-q>", function() ui.nav_file(1) end, { desc = "Harpoon File 1" })
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end, { desc = "Harpoon File 2" })
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end, { desc = "Harpoon File 3" })
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end, { desc = "Harpoon File 4" })

View file

@ -1,63 +0,0 @@
local lsp = require('lsp-zero')
lsp.preset('recommended')
lsp.ensure_installed({
'tsserver',
'eslint',
'lua_ls',
})
lsp.nvim_workspace()
local cmp = require('cmp')
local cmp_select = { behaviour = cmp.SelectBehavior.Select }
local cmp_mappings = lsp.defaults.cmp_mappings({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
['<C-Space>'] = cmp.mapping.complete(),
})
lsp.set_preferences({
lsp.set_preferences({
sign_icons = {
error = 'E',
warn = 'W',
hint = 'H',
info = 'I'
}
})
})
lsp.on_attach(function(_, bufnr)
local opts = { buffer = bufnr, remap = false }
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts, { desc = "Definition" })
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts, { desc = "Hover" })
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts, { desc = "Workspace Symbol" })
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts, { desc = "Open Info Float" })
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts, { desc = "Go to next" })
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts, { desc = "Go to previous" })
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts, { desc = "Code Actions" })
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts, { desc = "References" })
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts, { desc = "Rename Symbol" })
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts, { desc = "Signature Help" })
vim.keymap.set("n", "<leader>fd", function() vim.lsp.buf.format() end, opts, { desc = "Format Document" })
end)
lsp.skip_server_setup({"rust_analyzer"})
-- lsp_bindings = {
-- def = "gd",
-- hover = "K",
-- workspace_symbol = "<leader>vws",
-- goto_next = "[d",
-- goto_prev = "]d",
-- code_action = "<leader>vca",
-- references = "<leader>vrr",
-- rename = "<leader>vrr",
-- sig_help = "<C-h>",
-- format = "<leader>fd",
-- }
lsp.setup()

View file

@ -1,34 +0,0 @@
-- local theme = require("lualine.themes.rose-pine")
-- local modes = { "normal", "insert", "visual", "replace", "command", "inactive" }
-- for _, mode in ipairs(modes) do
-- theme[mode].c.bg = "NONE"
-- end
--
--
-- -- Set lualine as statusline
-- -- See `:help lualine.txt`
-- require('lualine').setup {
-- options = {
-- icons_enabled = false,
-- theme = 'rose-pine',
-- component_separators = '|',
-- section_separators = '',
-- },
-- }
local theme = require("lualine.themes.rose-pine")
local modes = { "normal", "insert", "visual", "replace", "command", "inactive" }
for _, mode in ipairs(modes) do
theme[mode].c.bg = "none"
end
-- Set lualine as statusline
-- See `:help lualine.txt`
require('lualine').setup {
options = {
icons_enabled = false,
theme = theme,
component_separators = '|',
section_separators = '',
},
}

View file

@ -1,10 +0,0 @@
require('rose-pine').setup({
groups = {
background = 'none'
},
highlight_groups = {
MsgArea = { bg = 'none' },
}
})
vim.cmd('colorscheme rose-pine')

View file

@ -1,32 +0,0 @@
local rt = require("rust-tools")
rt.setup({
server = {
on_attach = function(_, bufnr)
-- Hover actions
vim.keymap.set("n", "K", rt.hover_actions.hover_actions, { buffer = bufnr, desc = "Open Hover Actions" })
-- Code action groups
vim.keymap.set("n", "<Leader>ca", rt.code_action_group.code_action_group, { buffer = bufnr, desc = "Code Actions" })
local opts = { buffer = bufnr, remap = false }
-- vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
-- vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
-- vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts, { desc = "Open Info Float" })
-- vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
-- vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
-- vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
-- vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts, { desc = "Rename Symbol" })
-- vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
vim.keymap.set("n", "<leader>fd", function() vim.lsp.buf.format() end, opts, { desc = "Format Document" })
end,
},
tools = {
hover_actions = {
auto_focus = true,
}
}
})

View file

@ -1,9 +0,0 @@
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>pf', builtin.find_files, { desc = "Telescope Find Files" })
vim.keymap.set('n', '<C-p>', builtin.git_files, { desc = "Telescope Git Files (same as Find Files with ripgrep" })
vim.keymap.set('n', '<leader>ps', function ()
builtin.grep_string({ search = vim.fn.input("Grep > ") });
end, { desc = "Telescope Grep String" })
-- Enable telescope fzf native, if installed
pcall(require('telescope').load_extension, 'fzf')

View file

@ -1,21 +0,0 @@
require 'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all" (the four listed parsers should always be installed)
ensure_installed = { "vimdoc", "javascript", "typescript", "c", "lua", "vim", "python" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
autotag = {
enable = true
},
highlight = {
-- `false` will disable the whole extension
enable = true,
additional_vim_regex_highlighting = false,
},
}

View file

@ -1,3 +0,0 @@
-- require'treesj'.setup({
--
-- })

View file

@ -1 +0,0 @@
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle, { desc = "Open undotree" })

View file

@ -1,13 +0,0 @@
;; extends
(jsx_attribute
((property_identifier) @name (#eq? @name "className"))
(string ((string_fragment) @conceal (#set! conceal "󰇘"))))
; (jsx_attribute
; ((property_identifier)(#eq? property_identifier "className"))
; (string (string_fragment) @conceal (#set! conceal "󰇘")))
; (#set! @conceal "conceal" "󰇘")
; (jsx_attribute) @conceal (#set! conceal "c")

View file

@ -1 +0,0 @@
require("zynh")

View file

@ -1,32 +0,0 @@
local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true })
vim.api.nvim_create_autocmd('TextYankPost', {
callback = function()
vim.highlight.on_yank()
end,
group = highlight_group,
pattern = '*',
})
-- vim.cmd [[
-- autocmd TermOpen * startinsert
-- ]]
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter", "WinEnter", "TermOpen" }, {
callback = function()
vim.o.relativenumber = false
vim.o.number = false
vim.cmd.startinsert()
end,
pattern = { "term://*" }
})
vim.api.nvim_create_autocmd({ "BufLeave" }, {
callback = function() vim.cmd.stopinsert() end,
pattern = { "term://*" }
})
vim.api.nvim_create_autocmd({ "TermClose" }, {
callback = function() vim.api.nvim_input("<CR>") end,
})

View file

@ -1,3 +0,0 @@
require("zynh.remap")
require("zynh.set")
require("zynh.autos")

View file

@ -1,90 +0,0 @@
vim.cmd [[packadd packer.nvim]]
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use {
'nvim-telescope/telescope.nvim', tag = '0.1.0',
-- or , branch = '0.1.x',
requires = { 'nvim-lua/plenary.nvim' }
}
use {
'nvim-telescope/telescope-fzf-native.nvim',
run = 'make',
cond = vim.fn.executable 'make' == 1
}
use {
'rose-pine/neovim',
as = 'rose-pine',
}
use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
use 'nvim-treesitter/playground'
-- Harpoon is fun
use 'ThePrimeagen/harpoon'
-- mmm
use 'mbbill/undotree'
-- git
use 'tpope/vim-fugitive'
use 'lewis6991/gitsigns.nvim'
use {
'nvim-lualine/lualine.nvim',
after = 'rose-pine',
} -- Fancier statusline
use 'numToStr/Comment.nvim' -- "gc" to comment visual regions/lines
use 'windwp/nvim-ts-autotag' -- autoclose html tags
use {
'VonHeikemen/lsp-zero.nvim',
requires = {
-- LSP Support
{ 'neovim/nvim-lspconfig' }, -- Required
{ 'williamboman/mason.nvim' }, -- Optional
{ 'williamboman/mason-lspconfig.nvim' }, -- Optional
-- Autocompletion
{ 'hrsh7th/nvim-cmp' }, -- Required
{ 'hrsh7th/cmp-nvim-lsp' }, -- Required
{ 'hrsh7th/cmp-buffer' }, -- Optional
{ 'hrsh7th/cmp-path' }, -- Optional
{ 'saadparwaiz1/cmp_luasnip' }, -- Optional
{ 'hrsh7th/cmp-nvim-lua' }, -- Optional
-- Snippets
{ 'L3MON4D3/LuaSnip' }, -- Required
{ 'rafamadriz/friendly-snippets' }, -- Optional
}
}
use {
'simrat39/rust-tools.nvim',
after = 'lsp-zero.nvim'
}
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({
'Wansmer/treesj',
requires = { 'nvim-treesitter' },
})
end)

View file

@ -1,58 +0,0 @@
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex, { desc = "Open netrw (:Ex)" })
-- Move selected text
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", { desc = "Move Selected Text Down" })
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", { desc = "Move Selected Text Up" })
-- make J better by keeping cursor in place
vim.keymap.set("n", "J", "mzJ`z", { desc = "Join line below" })
-- Center half page jumps
vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = "Half page jump down" })
vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = "Half page jump up" })
-- Center search
-- vim.keymap.set("n", "n", "nzzzv")
-- vim.keymap.set("n", "N", "Nzzzv")
vim.keymap.set("x", "<leader>p", "\"_dP", { desc = "Paste from system clipboard" })
-- system clipboard copying
vim.keymap.set("n", "<leader>y", "\"+y", { desc = "Copy to system clipboard" })
vim.keymap.set("v", "<leader>y", "\"+y", { desc = "Copy to system clipboard" })
vim.keymap.set("n", "<leader>Y", "\"+Y", { desc = "Copy to system clipboard" })
-- null register deleting
vim.keymap.set("n", "<leader>d", "\"_d", { desc = "Delete to null register" })
vim.keymap.set("v", "<leader>d", "\"_d", { desc = "Delete to null register" })
-- #todo investigate this
vim.keymap.set("n", "Q", "<nop>")
-- replace current word
vim.keymap.set("n", "<leader>r", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], { desc = "Regex replace current word" })
-- make current file executable
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Make current file executable" })
vim.keymap.set("n", "<C-h>", "<C-w>h")
vim.keymap.set("n", "<C-j>", "<C-w>j")
vim.keymap.set("n", "<C-k>", "<C-w>k")
vim.keymap.set("n", "<C-l>", "<C-w>l")
vim.keymap.set("i", "<C-h>", "<C-w>h")
vim.keymap.set("i", "<C-j>", "<C-w>j")
vim.keymap.set("i", "<C-k>", "<C-w>k")
vim.keymap.set("i", "<C-l>", "<C-w>l")
vim.keymap.set("t", "<C-h>", "<C-w>h")
vim.keymap.set("t", "<C-j>", "<C-w>j")
vim.keymap.set("t", "<C-k>", "<C-w>k")
vim.keymap.set("t", "<C-l>", "<C-w>l")
-- Woe is ye who does not use tmux
-- vim.keymap.set("n", "<C-Enter>", function()
-- vim.cmd.vsplit()
-- vim.cmd.terminal()
-- end)

View file

@ -1,43 +0,0 @@
local opt = vim.opt
opt.nu = true
opt.relativenumber = true
opt.tabstop = 4
opt.softtabstop = 4
opt.shiftwidth = 4
opt.expandtab = true
opt.smartindent = true
-- Mouse mode
opt.mouse = 'a'
-- Make splitting more natural
opt.splitright = true
opt.splitbelow = true
opt.wrap = false
opt.swapfile = false
opt.backup = false
opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
opt.undofile = true
opt.hlsearch = false
opt.incsearch = true
opt.termguicolors = true
opt.scrolloff = 8
opt.signcolumn = "yes"
opt.isfname:append("@-@")
opt.updatetime = 50
opt.colorcolumn = "80,120"
opt.conceallevel = 2
vim.g.netrw_list_hide = ".DS_Store"