using LazyVim for non-vscode scenario
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
*.json
|
||||
*.toml
|
57
init.lua
57
init.lua
@@ -1,57 +1,2 @@
|
||||
-- 1.options
|
||||
-- Hint: use `:h <option>` to figure out the meaning if needed
|
||||
vim.opt.clipboard = 'unnamedplus' -- use system clipboard
|
||||
vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
|
||||
vim.opt.mouse = 'a' -- allow the mouse to be used in Nvim
|
||||
|
||||
-- Searching
|
||||
vim.opt.incsearch = true -- search as characters are entered
|
||||
vim.opt.hlsearch = true -- do not highlight matches
|
||||
vim.opt.ignorecase = true -- ignore case in searches by default
|
||||
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
|
||||
|
||||
-- Tab
|
||||
vim.opt.tabstop = 4 -- number of visual spaces per TAB
|
||||
vim.opt.softtabstop = 4 -- number of spacesin tab when editing
|
||||
vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab
|
||||
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
|
||||
|
||||
-- UI config
|
||||
vim.opt.number = true -- show absolute number
|
||||
vim.opt.relativenumber = true -- add numbers to each line on the left side
|
||||
vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally
|
||||
vim.opt.splitbelow = true -- open new vertical split bottom
|
||||
vim.opt.splitright = true -- open new horizontal splits right
|
||||
vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
|
||||
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
|
||||
|
||||
vim.opt.wrap = false -- Wrapping sucks (except on markdown)
|
||||
vim.opt.swapfile = false -- Do not leave any backup files
|
||||
vim.opt.showmatch = true -- Highlights the matching parenthesis
|
||||
vim.opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text
|
||||
vim.opt.hidden = true -- Allow multple buffers
|
||||
vim.opt.shortmess:append("c") -- Don't pass messages to |ins-completion-menu|.
|
||||
vim.opt.encoding = "utf-8" -- Just in case
|
||||
vim.opt.cmdheight = 2 -- Shows better messages
|
||||
|
||||
vim.opt.foldmethod = "indent"
|
||||
vim.opt.foldlevel = 99
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undofile = false
|
||||
vim.opt.writebackup = false
|
||||
|
||||
vim.g.mapleader = " " -- set leader key to space
|
||||
vim.g.maplocalleader = " " -- set local leader key to space
|
||||
|
||||
if vim.loop.os_uname().sysname == "Windows_NT" then -- set default shell to powershell on Windows
|
||||
vim.opt.shell = "powershell.exe"
|
||||
vim.opt.shellcmdflag = "-Command"
|
||||
vim.opt.shellquote = ""
|
||||
vim.opt.shellxquote = ""
|
||||
vim.opt.shellredir = "2>&1 | Out-File -Encoding ASCII %s; exit $LastExitCode"
|
||||
vim.opt.shellpipe = "2>&1 | Out-File -Encoding ASCII %s; exit $LastExitCode"
|
||||
end
|
||||
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
|
@@ -1,60 +0,0 @@
|
||||
return{
|
||||
{
|
||||
'smoka7/hop.nvim',
|
||||
version = "*",
|
||||
opts = {
|
||||
keys = 'etovxqpdygfblzhckisuran'
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>f',
|
||||
function()
|
||||
require('hop').hint_char1({ direction = require('hop.hint').HintDirection.AFTER_CURSOR, current_line_only = true })
|
||||
end,
|
||||
desc = 'Hop forward',
|
||||
},
|
||||
{
|
||||
'<leader>F',
|
||||
function()
|
||||
require('hop').hint_char1({ direction = require('hop.hint').HintDirection.BEFORE_CURSOR, current_line_only = true })
|
||||
end,
|
||||
desc = 'Hop backward',
|
||||
},
|
||||
{
|
||||
'<leader>t',
|
||||
function()
|
||||
require('hop').hint_char1({ direction = require('hop.hint').HintDirection.AFTER_CURSOR, current_line_only = true, hint_offset = -1 })
|
||||
end,
|
||||
desc = 'Hop forward (offset)',
|
||||
},
|
||||
{
|
||||
'<leader>T',
|
||||
function()
|
||||
require('hop').hint_char1({ direction = require('hop.hint').HintDirection.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 })
|
||||
end,
|
||||
desc = 'Hop backward (offset)',
|
||||
},
|
||||
{
|
||||
'<leader>s',
|
||||
function()
|
||||
require('hop').hint_char1()
|
||||
end,
|
||||
desc = 'Hop anywhere',
|
||||
},
|
||||
{
|
||||
'<leader>S',
|
||||
function()
|
||||
require('hop').hint_char2()
|
||||
end,
|
||||
desc = 'Hop anywhere (2 chars)',
|
||||
},
|
||||
{
|
||||
'<leader>sw',
|
||||
function()
|
||||
require('hop').hint_words()
|
||||
end,
|
||||
desc = 'Hop words',
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'vscode-neovim/vscode-multi-cursor.nvim',
|
||||
event = 'VeryLazy',
|
||||
cond = not not vim.g.vscode,
|
||||
opts = {},
|
||||
}
|
||||
}
|
||||
|
||||
-- This plugin is a Neovim extension for the VSCode multi-cursor feature.
|
||||
-- It is already included in the VSCode Neovim extension, so it is not necessary to install it separately.
|
8
lua/config/autocmds.lua
Normal file
8
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
lua/config/keymaps.lua
Normal file
3
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
|
@@ -1,4 +1,3 @@
|
||||
-- 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"
|
||||
@@ -15,15 +14,101 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
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 = " "
|
||||
if not vim.g.vscode then
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
else
|
||||
-- 1.options
|
||||
-- Hint: use `:h <option>` to figure out the meaning if needed
|
||||
vim.opt.clipboard = 'unnamedplus' -- use system clipboard
|
||||
vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
|
||||
vim.opt.mouse = 'a' -- allow the mouse to be used in Nvim
|
||||
|
||||
-- Setup lazy.nvim
|
||||
-- Searching
|
||||
vim.opt.incsearch = true -- search as characters are entered
|
||||
vim.opt.hlsearch = true -- do not highlight matches
|
||||
vim.opt.ignorecase = true -- ignore case in searches by default
|
||||
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
|
||||
|
||||
-- Tab
|
||||
vim.opt.tabstop = 4 -- number of visual spaces per TAB
|
||||
vim.opt.softtabstop = 4 -- number of spacesin tab when editing
|
||||
vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab
|
||||
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
|
||||
|
||||
-- UI config
|
||||
vim.opt.number = true -- show absolute number
|
||||
vim.opt.relativenumber = true -- add numbers to each line on the left side
|
||||
vim.opt.cursorline = true -- highlight cursor line underneath the cursor horizontally
|
||||
vim.opt.splitbelow = true -- open new vertical split bottom
|
||||
vim.opt.splitright = true -- open new horizontal splits right
|
||||
vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
|
||||
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
|
||||
|
||||
vim.opt.wrap = false -- Wrapping sucks (except on markdown)
|
||||
vim.opt.swapfile = false -- Do not leave any backup files
|
||||
vim.opt.showmatch = true -- Highlights the matching parenthesis
|
||||
vim.opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text
|
||||
vim.opt.hidden = true -- Allow multple buffers
|
||||
vim.opt.shortmess:append("c") -- Don't pass messages to |ins-completion-menu|.
|
||||
vim.opt.encoding = "utf-8" -- Just in case
|
||||
vim.opt.cmdheight = 2 -- Shows better messages
|
||||
|
||||
vim.opt.foldmethod = "indent"
|
||||
vim.opt.foldlevel = 99
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undofile = false
|
||||
vim.opt.writebackup = false
|
||||
|
||||
vim.g.mapleader = " " -- set leader key to space
|
||||
vim.g.maplocalleader = " " -- set local leader key to space
|
||||
|
||||
if vim.loop.os_uname().sysname == "Windows_NT" then -- set default shell to powershell on Windows
|
||||
vim.opt.shell = "powershell.exe"
|
||||
vim.opt.shellcmdflag = "-Command"
|
||||
vim.opt.shellquote = ""
|
||||
vim.opt.shellxquote = ""
|
||||
vim.opt.shellredir = "2>&1 | Out-File -Encoding ASCII %s; exit $LastExitCode"
|
||||
vim.opt.shellpipe = "2>&1 | Out-File -Encoding ASCII %s; exit $LastExitCode"
|
||||
end
|
||||
|
||||
if vim.g.vscode then
|
||||
local fold = {
|
||||
unfoldAll = function()
|
||||
vim.fn.VSCodeNotify("editor.unfoldAll")
|
||||
@@ -38,10 +123,10 @@ if vim.g.vscode then
|
||||
vim.fn.VSCodeNotify("editor.unfold")
|
||||
end,
|
||||
}
|
||||
vim.keymap.set('n', 'zR', fold.unfoldAll)
|
||||
vim.keymap.set('n', 'zM', fold.foldAll)
|
||||
vim.keymap.set('n', 'zo', fold.unfold)
|
||||
vim.keymap.set('n', 'zc', fold.fold)
|
||||
vim.keymap.set("n", "zR", fold.unfoldAll)
|
||||
vim.keymap.set("n", "zM", fold.foldAll)
|
||||
vim.keymap.set("n", "zo", fold.unfold)
|
||||
vim.keymap.set("n", "zc", fold.fold)
|
||||
|
||||
local codeReader = {
|
||||
quickInfo = function()
|
||||
@@ -49,7 +134,7 @@ if vim.g.vscode then
|
||||
end,
|
||||
}
|
||||
|
||||
vim.keymap.set('n', '<c-h>', codeReader.quickInfo)
|
||||
vim.keymap.set("n", "<c-h>", codeReader.quickInfo)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
@@ -62,18 +147,4 @@ if vim.g.vscode then
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
||||
|
||||
else
|
||||
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 },
|
||||
})
|
||||
|
||||
end
|
||||
|
3
lua/config/options.lua
Normal file
3
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
|
197
lua/plugins/example.lua
Normal file
197
lua/plugins/example.lua
Normal file
@@ -0,0 +1,197 @@
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, { name = "emoji" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, {
|
||||
function()
|
||||
return "😄"
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@@ -7,11 +7,11 @@ return{
|
||||
modes = {search = {enabled = true}},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "<leader>S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "<leader>r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "<leader>R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
{ "<leader>j", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "<leader>J", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
-- { "<leader>r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
-- { "<leader>R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
-- { "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@@ -1,59 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
signs = {
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signs_staged_enable = true,
|
||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
follow_files = true
|
||||
},
|
||||
auto_attach = true,
|
||||
attach_to_untracked = false,
|
||||
current_line_blame = true, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
ignore_whitespace = false,
|
||||
virt_text_priority = 100,
|
||||
use_focus = true,
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = 'single',
|
||||
style = 'minimal',
|
||||
relative = 'cursor',
|
||||
row = 0,
|
||||
col = 1
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require('gitsigns').setup(opts)
|
||||
end
|
||||
}
|
||||
}
|
@@ -1,83 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
opts = {
|
||||
options = {
|
||||
theme = "auto",
|
||||
},
|
||||
-- sections = {
|
||||
-- lualine_c = {
|
||||
-- -- 显示当前窗口编号(格式:[窗口号] 文件名)
|
||||
-- function()
|
||||
-- return "[" .. tostring(vim.api.nvim_win_get_number(0)) .. "] " .. vim.fn.expand("%:t")
|
||||
-- end,
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- local colors = {
|
||||
-- blue = '#80a0ff',
|
||||
-- cyan = '#79dac8',
|
||||
-- black = '#080808',
|
||||
-- white = '#c6c6c6',
|
||||
-- red = '#ff5189',
|
||||
-- violet = '#d183e8',
|
||||
-- grey = '#303030',
|
||||
-- }
|
||||
|
||||
-- local bubbles_theme = {
|
||||
-- normal = {
|
||||
-- a = { fg = colors.black, bg = colors.violet },
|
||||
-- b = { fg = colors.white, bg = colors.grey },
|
||||
-- c = { fg = colors.white },
|
||||
-- },
|
||||
|
||||
-- insert = { a = { fg = colors.black, bg = colors.blue } },
|
||||
-- visual = { a = { fg = colors.black, bg = colors.cyan } },
|
||||
-- replace = { a = { fg = colors.black, bg = colors.red } },
|
||||
|
||||
-- inactive = {
|
||||
-- a = { fg = colors.white, bg = colors.black },
|
||||
-- b = { fg = colors.white, bg = colors.black },
|
||||
-- c = { fg = colors.white },
|
||||
-- },
|
||||
-- }
|
||||
|
||||
-- return {
|
||||
-- {
|
||||
-- 'nvim-lualine/lualine.nvim',
|
||||
-- dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
-- opts = {
|
||||
-- options = {
|
||||
-- theme = bubbles_theme,
|
||||
-- component_separators = '',
|
||||
-- section_separators = { left = '', right = '' },
|
||||
-- },
|
||||
-- },
|
||||
-- sections = {
|
||||
-- lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } },
|
||||
-- lualine_b = { 'filename', 'branch' },
|
||||
-- lualine_c = {
|
||||
-- '%=', --[[ add your center components here in place of this comment ]]
|
||||
-- },
|
||||
-- lualine_x = {},
|
||||
-- lualine_y = { 'filetype', 'progress' },
|
||||
-- lualine_z = {
|
||||
-- { 'location', separator = { right = '' }, left_padding = 2 },
|
||||
-- },
|
||||
-- },
|
||||
-- inactive_sections = {
|
||||
-- lualine_a = { 'filename' },
|
||||
-- lualine_b = {},
|
||||
-- lualine_c = {},
|
||||
-- lualine_x = {},
|
||||
-- lualine_y = {},
|
||||
-- lualine_z = { 'location' },
|
||||
-- },
|
||||
-- tabline = {},
|
||||
-- extensions = {},
|
||||
-- }
|
||||
-- }
|
@@ -7,6 +7,6 @@ return{
|
||||
require("nvim-surround").setup({
|
||||
-- Configuration here, or leave empty to use defaults
|
||||
})
|
||||
end
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@ return {
|
||||
{
|
||||
"yorickpeterse/nvim-window",
|
||||
keys = {
|
||||
{ "<leader>w", "<cmd>lua require('nvim-window').pick()<cr>", desc = "nvim-window: Jump to window" },
|
||||
{ "<leader>ww", "<cmd>lua require('nvim-window').pick()<cr>", desc = "nvim-window: Jump to window" },
|
||||
},
|
||||
config = true,
|
||||
}
|
||||
|
@@ -1,4 +1,6 @@
|
||||
return {
|
||||
--[[ {"vim-neo-tree/neo-tree.nvim", enabled = false},
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
version = "*",
|
||||
lazy = false,
|
||||
@@ -8,4 +10,5 @@ return {
|
||||
config = function()
|
||||
require("nvim-tree").setup {}
|
||||
end,
|
||||
} ]]
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
return{
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
modes = {search = {enabled = true}},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "<leader>S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "<leader>r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "<leader>R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
}
|
||||
}
|
@@ -1,12 +0,0 @@
|
||||
return{
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "^3.0.0", -- 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
|
||||
}
|
||||
}
|
27
lua/vscodeplugins/vscode.lua
Normal file
27
lua/vscodeplugins/vscode.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
---@type Flash.Config
|
||||
opts = {},
|
||||
modes = { search = { enabled = true } },
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>j", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "<leader>J", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
-- { "<leader>r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
-- { "<leader>R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
-- { "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "^3.0.0", -- 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,
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user