(neovim) switch to own configuration
This commit is contained in:
parent
957ec52ca8
commit
977453fa05
51 changed files with 1145 additions and 358 deletions
25
_saved/vim/lazyvim/lua/config/autocmds.lua
Normal file
25
_saved/vim/lazyvim/lua/config/autocmds.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
--
|
||||
-- Add any additional autocmds here
|
||||
-- with `vim.api.nvim_create_autocmd`
|
||||
--
|
||||
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
|
||||
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
|
||||
pattern = { "helmfile.y?ml", "*.gotmpl" },
|
||||
callback = function()
|
||||
vim.cmd("set filetype=helm")
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufReadPre" }, {
|
||||
callback = function()
|
||||
vim.api.nvim_set_hl(0, "ColorColumn", { bg = "#770000" })
|
||||
vim.api.nvim_set_hl(0, "DiffChange", { bg = "NONE", fg = "#e7c547" })
|
||||
vim.api.nvim_set_hl(0, "DiffText", { bg = "NONE", fg = "#ff8700" })
|
||||
vim.api.nvim_set_hl(0, "SpellBad", { bg = "#770000", fg = "#ffffff" })
|
||||
vim.api.nvim_set_hl(0, "Visual", { bg = "#0094d8", fg = "#ffffff" })
|
||||
end,
|
||||
})
|
67
_saved/vim/lazyvim/lua/config/keymaps.lua
Normal file
67
_saved/vim/lazyvim/lua/config/keymaps.lua
Normal file
|
@ -0,0 +1,67 @@
|
|||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
|
||||
local map = vim.keymap.set
|
||||
local nomap = vim.keymap.del
|
||||
|
||||
nomap("n", "<leader><space>")
|
||||
nomap("n", "<leader>,")
|
||||
nomap("n", "<leader>.")
|
||||
nomap("n", "<leader>?")
|
||||
nomap("n", "<leader>K")
|
||||
nomap("n", "<leader>l")
|
||||
nomap("n", "<leader>L")
|
||||
nomap("n", "<leader>S")
|
||||
nomap("n", "<leader>`")
|
||||
|
||||
nomap("n", "<leader>bb")
|
||||
nomap("n", "<leader>bD")
|
||||
nomap("n", "<leader>bo")
|
||||
|
||||
nomap("n", "<leader>E")
|
||||
|
||||
nomap("n", "<leader>fB")
|
||||
nomap("n", "<leader>fe")
|
||||
nomap("n", "<leader>fE")
|
||||
nomap("n", "<leader>fn")
|
||||
nomap("n", "<leader>fp")
|
||||
nomap("n", "<leader>fR")
|
||||
nomap("n", "<leader>ft")
|
||||
nomap("n", "<leader>fT")
|
||||
|
||||
nomap("n", "<leader>gY")
|
||||
nomap("n", "<leader>gS")
|
||||
|
||||
nomap("n", "<leader>qq")
|
||||
|
||||
nomap("n", "<leader>xl")
|
||||
nomap("n", "<leader>xq")
|
||||
|
||||
map("i", "<C-a>", "<esc>I")
|
||||
map("i", "<C-e>", "<esc>A")
|
||||
|
||||
map("n", "<esc><cr>", "<esc><cmd>wq!<cr>", { desc = "Save and Exit", remap = true })
|
||||
map("n", "<tab>", "<C-w>w", { desc = "Switch Pane", remap = true })
|
||||
|
||||
map("n", "<leader>-", "<C-W>s", { desc = "Split Horizontally", remap = true })
|
||||
map("n", "<leader>/", "gcc", { desc = "Toggle Comments", remap = true })
|
||||
map("n", "<leader>|", "<C-W>v", { desc = "Split Vertically", remap = true })
|
||||
map("n", "<leader>bl", function()
|
||||
Snacks.picker.buffers()
|
||||
end, { desc = "Buffer List", remap = true })
|
||||
map("n", "<leader>b[", "<cmd>bprevious<CR>", { desc = "Previous Buffer", remap = true })
|
||||
map("n", "<leader>b]", "<cmd>bnext<CR>", { desc = "Next Buffer", remap = true })
|
||||
map("n", "<leader>bn", "<cmd>enew<CR>", { desc = "New Buffer", remap = true })
|
||||
map("n", "<leader>h", "<cmd>set hlsearch!<cr>", { desc = "Toggle hlsearch", remap = true })
|
||||
map(
|
||||
"n",
|
||||
"<leader>m",
|
||||
'<cmd>execute "set colorcolumn=" . (&colorcolumn == "" ? "80,120" : "")<cr>',
|
||||
{ desc = "Toggle Columns", remap = true }
|
||||
)
|
||||
map("n", "<leader>T", function()
|
||||
Snacks.terminal()
|
||||
end, { desc = "Terminal", remap = true })
|
||||
|
||||
map("v", "<leader>/", "gc", { desc = "Toggle Comments", remap = true })
|
55
_saved/vim/lazyvim/lua/config/lazy.lua
Normal file
55
_saved/vim/lazyvim/lua/config/lazy.lua
Normal file
|
@ -0,0 +1,55 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
checker = {
|
||||
enabled = true, -- check for plugin updates periodically
|
||||
notify = false, -- notify on update
|
||||
}, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
rocks = {
|
||||
enabled = false,
|
||||
},
|
||||
})
|
20
_saved/vim/lazyvim/lua/config/options.lua
Normal file
20
_saved/vim/lazyvim/lua/config/options.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
local o = vim.o
|
||||
o.expandtab = true
|
||||
o.gdefault = true
|
||||
o.hlsearch = false
|
||||
o.inccommand = "split"
|
||||
o.relativenumber = false
|
||||
o.shiftround = true
|
||||
o.termguicolors = true
|
||||
o.wrap = true
|
||||
o.writebackup = false
|
||||
|
||||
o.clipboard = ""
|
||||
o.foldcolumn = "0"
|
||||
o.mouse = ""
|
||||
o.shiftwidth = 2
|
||||
o.softtabstop = 2
|
||||
o.statuscolumn = ""
|
||||
o.tabstop = 2
|
||||
o.whichwrap = ""
|
Loading…
Add table
Add a link
Reference in a new issue