update vscode nvim config
added lazy.nvim and mini.nvim (mainly just for mini.surround).
This commit is contained in:
parent
342255e050
commit
6674abcee8
6
init.lua
6
init.lua
|
@ -1,8 +1,8 @@
|
||||||
print("Loading Neovim Configuration..")
|
|
||||||
if vim.g.vscode then
|
if vim.g.vscode then
|
||||||
-- VSCode extension
|
-- VSCode Neovim extension configuration
|
||||||
print("Loading VSCode Neovim Configuration..")
|
print("Loading VSCode Neovim Configuration..\n")
|
||||||
require 'vscode-init'
|
require 'vscode-init'
|
||||||
|
print("VSCode Neovim Configuration Loaded!")
|
||||||
else
|
else
|
||||||
require 'cli-init'
|
require 'cli-init'
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,4 +31,9 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
||||||
|
|
||||||
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
||||||
vim.opt.ignorecase = true
|
vim.opt.ignorecase = true
|
||||||
vim.opt.smartcase = true
|
vim.opt.smartcase = true
|
||||||
|
|
||||||
|
-- * Manage plugins here
|
||||||
|
if true then
|
||||||
|
require("vscode-plugins")
|
||||||
|
end
|
|
@ -0,0 +1,40 @@
|
||||||
|
-- VSCode Neovim plugin management
|
||||||
|
|
||||||
|
-- [[ Install `lazy.nvim` plugin manager ]]
|
||||||
|
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
||||||
|
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
||||||
|
if not vim.uv.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
|
||||||
|
error('Error cloning lazy.nvim:\n' .. out)
|
||||||
|
end
|
||||||
|
end ---@diagnostic disable-next-line: undefined-field
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
|
||||||
|
-- Lazy
|
||||||
|
require('lazy').setup({
|
||||||
|
{ -- Collection of various small independent plugins/modules
|
||||||
|
'echasnovski/mini.nvim',
|
||||||
|
config = function()
|
||||||
|
-- Better Around/Inside textobjects
|
||||||
|
--
|
||||||
|
-- Examples:
|
||||||
|
-- - va) - [V]isually select [A]round [)]paren
|
||||||
|
-- - yinq - [Y]an [I]nside [N]ext [Q]uote
|
||||||
|
-- - ci' - [C]hange [I]nside [']quote
|
||||||
|
require('mini.ai').setup { n_lines = 500 }
|
||||||
|
|
||||||
|
-- Add/delete/replace surroundings (bracets, quotes, etc.)
|
||||||
|
--
|
||||||
|
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||||
|
-- - sd' - [S]urround [D]elete [']quotes
|
||||||
|
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||||
|
require('mini.surround').setup()
|
||||||
|
|
||||||
|
-- For more Mini.nvim stuff:
|
||||||
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
Loading…
Reference in New Issue