remove nvim config
This commit is contained in:
parent
91512247f1
commit
01098b6818
13 changed files with 0 additions and 1039 deletions
|
|
@ -1,54 +0,0 @@
|
|||
return {
|
||||
{
|
||||
"ThePrimeagen/refactoring.nvim",
|
||||
requires = {
|
||||
{ "nvim-lua/plenary.nvim" },
|
||||
{ "nvim-treesitter/nvim-treesitter" },
|
||||
},
|
||||
config = function()
|
||||
require("refactoring").setup({})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"ThePrimeagen/git-worktree.nvim",
|
||||
},
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
||||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
config = function()
|
||||
-- load the colorscheme here
|
||||
vim.cmd([[colorscheme tokyonight]])
|
||||
end,
|
||||
},
|
||||
-- formatting & linting
|
||||
"jose-elias-alvarez/null-ls.nvim",
|
||||
-- use("jayp0521/mason-null-ls.nvim")
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup({
|
||||
-- Configuration here, or leave empty to use defaults
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
requires = "nvim-tree/nvim-web-devicons",
|
||||
config = function()
|
||||
require("trouble").setup({
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rafamadriz/friendly-snippets",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
-- autoformat.lua
|
||||
--
|
||||
-- Use your language server to automatically format your code on save.
|
||||
-- Adds additional commands as well to manage the behavior
|
||||
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
config = function()
|
||||
-- Switch for controlling whether you want autoformatting.
|
||||
-- Use :KickstartFormatToggle to toggle autoformatting on or off
|
||||
local format_is_enabled = true
|
||||
vim.api.nvim_create_user_command('KickstartFormatToggle', function()
|
||||
format_is_enabled = not format_is_enabled
|
||||
print('Setting autoformatting to: ' .. tostring(format_is_enabled))
|
||||
end, {})
|
||||
|
||||
-- Create an augroup that is used for managing our formatting autocmds.
|
||||
-- We need one augroup per client to make sure that multiple clients
|
||||
-- can attach to the same buffer without interfering with each other.
|
||||
local _augroups = {}
|
||||
local get_augroup = function(client)
|
||||
if not _augroups[client.id] then
|
||||
local group_name = 'kickstart-lsp-format-' .. client.name
|
||||
local id = vim.api.nvim_create_augroup(group_name, { clear = true })
|
||||
_augroups[client.id] = id
|
||||
end
|
||||
|
||||
return _augroups[client.id]
|
||||
end
|
||||
|
||||
-- Whenever an LSP attaches to a buffer, we will run this function.
|
||||
--
|
||||
-- See `:help LspAttach` for more information about this autocmd event.
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('kickstart-lsp-attach-format', { clear = true }),
|
||||
-- This is where we attach the autoformatting for reasonable clients
|
||||
callback = function(args)
|
||||
local client_id = args.data.client_id
|
||||
local client = vim.lsp.get_client_by_id(client_id)
|
||||
local bufnr = args.buf
|
||||
|
||||
-- Only attach to clients that support document formatting
|
||||
if not client.server_capabilities.documentFormattingProvider then
|
||||
return
|
||||
end
|
||||
|
||||
-- Tsserver usually works poorly. Sorry you work with bad languages
|
||||
-- You can remove this line if you know what you're doing :)
|
||||
if client.name == 'tsserver' then
|
||||
return
|
||||
end
|
||||
|
||||
-- Create an autocmd that will run *before* we save the buffer.
|
||||
-- Run the formatting command for the LSP that has just attached.
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
group = get_augroup(client),
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
if not format_is_enabled then
|
||||
return
|
||||
end
|
||||
|
||||
vim.lsp.buf.format {
|
||||
async = false,
|
||||
filter = function(c)
|
||||
return c.id == client.id
|
||||
end,
|
||||
}
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
-- debug.lua
|
||||
--
|
||||
-- Shows how to use the DAP plugin to debug your code.
|
||||
--
|
||||
-- Primarily focused on configuring the debugger for Go, but can
|
||||
-- be extended to other languages as well. That's why it's called
|
||||
-- kickstart.nvim and not kitchen-sink.nvim ;)
|
||||
|
||||
return {
|
||||
-- NOTE: Yes, you can install new plugins here!
|
||||
'mfussenegger/nvim-dap',
|
||||
-- NOTE: And you can specify dependencies as well
|
||||
dependencies = {
|
||||
-- Creates a beautiful debugger UI
|
||||
'rcarriga/nvim-dap-ui',
|
||||
|
||||
-- Installs the debug adapters for you
|
||||
'williamboman/mason.nvim',
|
||||
'jay-babu/mason-nvim-dap.nvim',
|
||||
|
||||
-- Add your own debuggers here
|
||||
'leoluz/nvim-dap-go',
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
|
||||
require('mason-nvim-dap').setup {
|
||||
-- Makes a best effort to setup the various debuggers with
|
||||
-- reasonable debug configurations
|
||||
automatic_setup = true,
|
||||
|
||||
-- You can provide additional configuration to the handlers,
|
||||
-- see mason-nvim-dap README for more information
|
||||
handlers = {},
|
||||
|
||||
-- You'll need to check that you have the required things installed
|
||||
-- online, please don't ask me how to install them :)
|
||||
ensure_installed = {
|
||||
-- Update this to ensure that you have the debuggers for the langs you want
|
||||
'delve',
|
||||
},
|
||||
}
|
||||
|
||||
-- Basic debugging keymaps, feel free to change to your liking!
|
||||
vim.keymap.set('n', '<F5>', dap.continue)
|
||||
vim.keymap.set('n', '<F1>', dap.step_into)
|
||||
vim.keymap.set('n', '<F2>', dap.step_over)
|
||||
vim.keymap.set('n', '<F3>', dap.step_out)
|
||||
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint)
|
||||
vim.keymap.set('n', '<leader>B', function()
|
||||
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
end)
|
||||
|
||||
-- Dap UI setup
|
||||
-- For more information, see |:help nvim-dap-ui|
|
||||
dapui.setup {
|
||||
-- Set icons to characters that are more likely to work in every terminal.
|
||||
-- Feel free to remove or use ones that you like more! :)
|
||||
-- Don't feel like these are good choices.
|
||||
icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
|
||||
controls = {
|
||||
icons = {
|
||||
pause = '⏸',
|
||||
play = '▶',
|
||||
step_into = '⏎',
|
||||
step_over = '⏭',
|
||||
step_out = '⏮',
|
||||
step_back = 'b',
|
||||
run_last = '▶▶',
|
||||
terminate = '⏹',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
|
||||
-- Install golang specific config
|
||||
require('dap-go').setup()
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
local M = {}
|
||||
|
||||
local function bind(op, outer_opts)
|
||||
outer_opts = outer_opts or {noremap = true}
|
||||
return function(lhs, rhs, opts)
|
||||
opts = vim.tbl_extend("force",
|
||||
outer_opts,
|
||||
opts or {}
|
||||
)
|
||||
vim.keymap.set(op, lhs,rhs, opts)
|
||||
end
|
||||
end
|
||||
|
||||
M.nmap = bind("n", {noremap = false})
|
||||
M.nnoremap = bind("n")
|
||||
M.vnoremap = bind("v")
|
||||
M.xnoremap = bind("x")
|
||||
M.inoremap = bind("i")
|
||||
|
||||
return M
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
local h = require("null-ls.helpers")
|
||||
local methods = require("null-ls.methods")
|
||||
|
||||
local FORMATTING = methods.internal.FORMATTING
|
||||
|
||||
return h.make_builtin({
|
||||
name = "rubocop",
|
||||
meta = {
|
||||
url = "https://github.com/rubocop/rubocop",
|
||||
description = "Ruby static code analyzer and formatter, based on the community Ruby style guide.",
|
||||
},
|
||||
method = FORMATTING,
|
||||
filetypes = { "ruby" },
|
||||
generator_opts = {
|
||||
command = "rubocop",
|
||||
args = {
|
||||
"--auto-correct",
|
||||
"-f",
|
||||
"quiet",
|
||||
"--stdin",
|
||||
"$FILENAME",
|
||||
},
|
||||
to_stdin = true,
|
||||
-- from_stderr = true,
|
||||
},
|
||||
factory = h.formatter_factory,
|
||||
})
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
local Remap = require("rahcodes.keymap")
|
||||
local nmap = Remap.nmap
|
||||
|
||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
|
||||
vim.keymap.set("n", "n", "nzzzv")
|
||||
vim.keymap.set("n", "N", "Nzzzv")
|
||||
|
||||
-- don't bork paste buffer when pasting
|
||||
vim.keymap.set("x", "<leader>p", '"_dP')
|
||||
|
||||
vim.keymap.set("i", "<C-c>", "<Esc>")
|
||||
|
||||
-- vim.keymap.set("n", "/", "/\v")
|
||||
-- vim.keymap.set("v", "/", "/\v")
|
||||
vim.keymap.set("n", "<leader>`", ":noh<cr>")
|
||||
|
||||
-- No Cheating
|
||||
vim.keymap.set("n", "<up>", "<nop>")
|
||||
vim.keymap.set("n", "<down>", "<nop>")
|
||||
vim.keymap.set("n", "<left>", "<nop>")
|
||||
vim.keymap.set("n", "<right>", "<nop>")
|
||||
vim.keymap.set("i", "<up>", "<nop>")
|
||||
vim.keymap.set("i", "<down>", "<nop>")
|
||||
vim.keymap.set("i", "<left>", "<nop>")
|
||||
vim.keymap.set("i", "<right>", "<nop>")
|
||||
|
||||
-- No weird line jumps
|
||||
vim.keymap.set("n", "j", "gj")
|
||||
vim.keymap.set("n", "k", "gk")
|
||||
|
||||
-- Copy to system clipboard
|
||||
vim.keymap.set("n", "<leader>y", '"*y')
|
||||
vim.keymap.set("v", "<leader>y", '"*y')
|
||||
vim.keymap.set("n", "<leader>yy", '"+y')
|
||||
vim.keymap.set("v", "<leader>yy", '"+y')
|
||||
|
||||
vim.keymap.set("n", "<C-f>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
|
||||
|
||||
-- Move buffers
|
||||
nmap("sp", ":bprev<Return>")
|
||||
nmap("sn", ":bnext<Return>")
|
||||
|
||||
-- Quickfix list navigation
|
||||
vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
|
||||
vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
|
||||
vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
|
||||
vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
|
||||
|
||||
-- Save
|
||||
nmap("<C-s>", ":wa<CR>")
|
||||
|
||||
-- See `:help telescope.builtin`
|
||||
vim.keymap.set("n", "<leader>m", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" })
|
||||
vim.keymap.set("n", "<leader>gb", require("telescope.builtin").git_branches, { desc = "[G]it [B]ranches" })
|
||||
vim.keymap.set("n", "<leader>sb", require("telescope.builtin").buffers, { desc = "[ ] Find existing buffers" })
|
||||
|
||||
-- Trouble bindings
|
||||
vim.keymap.set("n", "<leader>xx", function() require("trouble").open() end)
|
||||
vim.keymap.set("n", "<leader>xw", function() require("trouble").open("workspace_diagnostics") end)
|
||||
vim.keymap.set("n", "<leader>xd", function() require("trouble").open("document_diagnostics") end)
|
||||
vim.keymap.set("n", "<leader>xq", function() require("trouble").open("quickfix") end)
|
||||
vim.keymap.set("n", "<leader>xl", function() require("trouble").open("loclist") end)
|
||||
vim.keymap.set("n", "gR", function() require("trouble").open("lsp_references") end)
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
vim.opt.guicursor = ""
|
||||
|
||||
vim.opt.nu = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
|
||||
vim.opt.smartindent = true
|
||||
|
||||
vim.opt.wrap = false
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||
|
||||
vim.opt.incsearch = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.isfname:append("@-@")
|
||||
|
||||
vim.opt.colorcolumn = "80"
|
||||
|
||||
vim.opt.mouse = "v"
|
||||
Loading…
Add table
Add a link
Reference in a new issue