Add nvim to dotfiles
This commit is contained in:
8
nvim/lua/config/autocmds.lua
Normal file
8
nvim/lua/config/autocmds.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
-- 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")
|
||||
3
nvim/lua/config/keymaps.lua
Normal file
3
nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- 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
|
||||
53
nvim/lua/config/lazy.lua
Normal file
53
nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
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
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
3
nvim/lua/config/options.lua
Normal file
3
nvim/lua/config/options.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
72
nvim/lua/plugins/example.lua
Normal file
72
nvim/lua/plugins/example.lua
Normal file
@@ -0,0 +1,72 @@
|
||||
return {
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
{
|
||||
"kawre/leetcode.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
opts = {
|
||||
lang = "rust",
|
||||
|
||||
keys = {
|
||||
toggle = { "q" }, ---@type string|string[]
|
||||
confirm = { "<CR>" }, ---@type string|string[]
|
||||
|
||||
reset_testcases = "r", ---@type string
|
||||
use_testcase = "U", ---@type string
|
||||
focus_testcases = "H", ---@type string
|
||||
focus_result = "L", ---@type string
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- "yetone/avante.nvim",
|
||||
-- build = vim.fn.has("win32") ~= 0 and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
|
||||
-- or "make",
|
||||
-- event = "VeryLazy",
|
||||
-- opts = {
|
||||
-- provider = "copilot",
|
||||
-- selection = {
|
||||
-- hint_display = "none",
|
||||
-- },
|
||||
-- behaviour = {
|
||||
-- auto_set_keymaps = false,
|
||||
-- },
|
||||
-- },
|
||||
-- cmd = {
|
||||
-- "AvanteAsk",
|
||||
-- "AvanteBuild",
|
||||
-- "AvanteChat",
|
||||
-- "AvanteClear",
|
||||
-- "AvanteEdit",
|
||||
-- "AvanteFocus",
|
||||
-- "AvanteHistory",
|
||||
-- "AvanteModels",
|
||||
-- "AvanteRefresh",
|
||||
-- "AvanteShowRepoMap",
|
||||
-- "AvanteStop",
|
||||
-- "AvanteSwitchProvider",
|
||||
-- "AvanteToggle",
|
||||
-- },
|
||||
-- keys = {
|
||||
-- { "<leader>aa", "<cmd>AvanteAsk<CR>", desc = "Ask Avante" },
|
||||
-- { "<leader>ac", "<cmd>AvanteChat<CR>", desc = "Chat with Avante" },
|
||||
-- { "<leader>ae", "<cmd>AvanteEdit<CR>", desc = "Edit Avante" },
|
||||
-- { "<leader>af", "<cmd>AvanteFocus<CR>", desc = "Focus Avante" },
|
||||
-- { "<leader>ah", "<cmd>AvanteHistory<CR>", desc = "Avante History" },
|
||||
-- { "<leader>am", "<cmd>AvanteModels<CR>", desc = "Select Avante Model" },
|
||||
-- { "<leader>an", "<cmd>AvanteChatNew<CR>", desc = "New Avante Chat" },
|
||||
-- { "<leader>ap", "<cmd>AvanteSwitchProvider<CR>", desc = "Switch Avante Provider" },
|
||||
-- { "<leader>ar", "<cmd>AvanteRefresh<CR>", desc = "Refresh Avante" },
|
||||
-- { "<leader>as", "<cmd>AvanteStop<CR>", desc = "Stop Avante" },
|
||||
-- { "<leader>at", "<cmd>AvanteToggle<CR>", desc = "Toggle Avante" },
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
Reference in New Issue
Block a user