backup: vim.pack config before lazy.nvim migration
This commit is contained in:
parent
cfdc17be3a
commit
cc3d4d5376
|
|
@ -0,0 +1,24 @@
|
|||
1. Move the cursor to this line.
|
||||
|
||||
2. Press [v](v) and move the cursor to the fifth item below. Notice that the
|
||||
text is highlighted.
|
||||
|
||||
3. Press the `:`{normal} character. At the bottom of the screen
|
||||
|
||||
`:'<,'>`{vim}
|
||||
|
||||
will appear.
|
||||
|
||||
4. Type
|
||||
|
||||
`w TEST`{vim}
|
||||
|
||||
where TEST is a filename that does not exist yet. Verify that you see
|
||||
|
||||
`:'<,'>w TEST`{vim}
|
||||
|
||||
before you press `<Enter>`{normal}.
|
||||
|
||||
5. Neovim will write the selected lines to the file TEST. Use `:!{unix:(ls),win:(dir)}`{vim} to see it.
|
||||
Do not remove it yet! We will use it in the next lesson.
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
-- Bootstrap lazy.nvim
|
||||
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)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
27
init.lua
27
init.lua
|
|
@ -99,7 +99,7 @@ do
|
|||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||
vim.g.have_nerd_font = false
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.o`
|
||||
|
|
@ -377,24 +377,6 @@ do
|
|||
},
|
||||
}
|
||||
|
||||
-- [[ Colorscheme ]]
|
||||
-- You can easily change to a different colorscheme.
|
||||
-- Change the name of the colorscheme plugin below, and then
|
||||
-- change the command under that to load whatever the name of that colorscheme is.
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
vim.pack.add { gh 'folke/tokyonight.nvim' }
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require('tokyonight').setup {
|
||||
styles = {
|
||||
comments = { italic = false }, -- Disable italics in comments
|
||||
},
|
||||
}
|
||||
|
||||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'tokyonight-night'
|
||||
|
||||
-- Highlight todo, notes, etc in comments
|
||||
vim.pack.add { gh 'folke/todo-comments.nvim' }
|
||||
|
|
@ -961,14 +943,15 @@ do
|
|||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||
--
|
||||
-- require 'kickstart.plugins.debug'
|
||||
-- require 'kickstart.plugins.indent_line'
|
||||
-- require 'kickstart.plugins.lint'
|
||||
require 'kickstart.plugins.indent_line'
|
||||
require 'kickstart.plugins.lint'
|
||||
-- require 'kickstart.plugins.autopairs'
|
||||
-- require 'kickstart.plugins.neo-tree'
|
||||
-- require 'kickstart.plugins.gitsigns' -- adds gitsigns recommended keymaps
|
||||
require 'kickstart.plugins.gitsigns' -- adds gitsigns recommended keymaps
|
||||
|
||||
-- NOTE: You can add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
--
|
||||
|
||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||
-- require 'custom.plugins'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"mini.icons": { "branch": "main", "commit": "9c7b1b90b15bdd69c52f6e31889dbc9987c30ec4" },
|
||||
"oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" }
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
"coder/claudecode.nvim",
|
||||
dependencies = { "folke/snacks.nvim" },
|
||||
config = true,
|
||||
keys = {
|
||||
{ "<leader>a", nil, desc = "AI/Claude Code" },
|
||||
{ "<leader>ac", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude" },
|
||||
{ "<leader>af", "<cmd>ClaudeCodeFocus<cr>", desc = "Focus Claude" },
|
||||
{ "<leader>ar", "<cmd>ClaudeCode --resume<cr>", desc = "Resume Claude" },
|
||||
{ "<leader>aC", "<cmd>ClaudeCode --continue<cr>", desc = "Continue Claude" },
|
||||
{ "<leader>am", "<cmd>ClaudeCodeSelectModel<cr>", desc = "Select Claude model" },
|
||||
{ "<leader>ab", "<cmd>ClaudeCodeAdd %<cr>", desc = "Add current buffer" },
|
||||
{ "<leader>as", "<cmd>ClaudeCodeSend<cr>", mode = "v", desc = "Send to Claude" },
|
||||
{
|
||||
"<leader>as",
|
||||
"<cmd>ClaudeCodeTreeAdd<cr>",
|
||||
desc = "Add file",
|
||||
ft = { "NvimTree", "neo-tree", "oil", "minifiles", "netrw" },
|
||||
},
|
||||
-- Diff management
|
||||
{ "<leader>aa", "<cmd>ClaudeCodeDiffAccept<cr>", desc = "Accept diff" },
|
||||
{ "<leader>ad", "<cmd>ClaudeCodeDiffDeny<cr>", desc = "Deny diff" },
|
||||
},
|
||||
}
|
||||
|
|
@ -5,9 +5,11 @@
|
|||
|
||||
-- Iterate over all Lua files in the plugins directory and load them
|
||||
local plugins_dir = vim.fs.joinpath(vim.fn.stdpath 'config', 'lua', 'custom', 'plugins')
|
||||
for file_name, type in vim.fs.dir(plugins_dir) do
|
||||
if type == 'file' and file_name:match '%.lua$' and file_name ~= 'init.lua' then
|
||||
local module = file_name:gsub('%.lua$', '')
|
||||
require('custom.plugins.' .. module)
|
||||
end
|
||||
for file_name, type in vim.fs.dir(plugins_dir) do
|
||||
if type == 'file' and file_name:match '%.lua$' and file_name ~= 'init.lua' then
|
||||
local module = file_name:gsub('%.lua$', '')
|
||||
require('custom.plugins.' .. module)
|
||||
end
|
||||
end
|
||||
|
||||
--return {}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
-- Define the configuration for the dbt language server
|
||||
vim.lsp.config('dbt', {
|
||||
-- The command to start the server
|
||||
-- Ensure 'dbt-language-server' is in your system $PATH
|
||||
cmd = { "dbt-language-server" },
|
||||
|
||||
-- The filetypes this server should attach to
|
||||
filetypes = { "sql", "yaml" },
|
||||
|
||||
-- How to find the project root (replaces util.root_pattern)
|
||||
root_markers = { "dbt_project.yml" },
|
||||
|
||||
-- General settings (standard for most servers)
|
||||
settings = {},
|
||||
})
|
||||
|
||||
-- Tell Neovim to actually use/enable this server
|
||||
vim.lsp.enable('dbt')
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
'brianhuster/live-preview.nvim',
|
||||
dependencies = {
|
||||
-- You can choose one of the following pickers
|
||||
'nvim-telescope/telescope.nvim',
|
||||
'ibhagwan/fzf-lua',
|
||||
'echasnovski/mini.pick',
|
||||
'folke/snacks.nvim',
|
||||
},
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
return {
|
||||
{
|
||||
"benlubas/molten-nvim",
|
||||
version = "^1.0.0", -- use version <2.0.0 to avoid breaking changes
|
||||
dependencies = { "3rd/image.nvim" },
|
||||
build = ":UpdateRemotePlugins",
|
||||
init = function()
|
||||
-- these are examples, not defaults. Please see the readme
|
||||
vim.g.molten_image_provider = "image.nvim"
|
||||
vim.g.molten_output_win_max_height = 20
|
||||
end,
|
||||
},
|
||||
{
|
||||
'willothy/wezterm.nvim',
|
||||
config = true
|
||||
},
|
||||
|
||||
{
|
||||
"3rd/image.nvim",
|
||||
build = false, -- so that it doesn't build the rock https://github.com/3rd/image.nvim/issues/91#issuecomment-2453430239
|
||||
opts = {
|
||||
processor = "magick_cli",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
-- Initialize the icons (optional, but highly recommended for Oil)
|
||||
require('mini.icons').setup({})
|
||||
|
||||
-- Initialize and configure Oil
|
||||
require('oil').setup({
|
||||
-- You can add any custom oil options here later!
|
||||
})
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
-- [[ Colorscheme ]]
|
||||
-- You can easily change to a different colorscheme.
|
||||
-- Change the name of the colorscheme plugin below, and then
|
||||
-- change the command under that to load whatever the name of that colorscheme is.
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
vim.pack.add { 'folke/tokyonight.nvim' }
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
require('tokyonight').setup {
|
||||
styles = {
|
||||
comments = { italic = false }, -- Disable italics in comments
|
||||
},
|
||||
}
|
||||
|
||||
vim.pack.add({
|
||||
{ src = "https://gitlab.com/motaz-shokry/gruvbox.nvim" }
|
||||
})
|
||||
|
||||
require("gruvbox").setup() -- for configs
|
||||
vim.cmd("colorscheme gruvbox-medium") -- apply the theme
|
||||
|
||||
Loading…
Reference in New Issue