deleta some default keymap of flash.nvim in LazyVim
This commit is contained in:
@@ -55,9 +55,9 @@ if not vim.g.vscode then
|
|||||||
else
|
else
|
||||||
-- 1.options
|
-- 1.options
|
||||||
-- Hint: use `:h <option>` to figure out the meaning if needed
|
-- Hint: use `:h <option>` to figure out the meaning if needed
|
||||||
vim.opt.clipboard = 'unnamedplus' -- use system clipboard
|
vim.opt.clipboard = "unnamedplus" -- use system clipboard
|
||||||
vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
|
vim.opt.completeopt = { "menu", "menuone", "noselect" }
|
||||||
vim.opt.mouse = 'a' -- allow the mouse to be used in Nvim
|
vim.opt.mouse = "a" -- allow the mouse to be used in Nvim
|
||||||
|
|
||||||
-- Searching
|
-- Searching
|
||||||
vim.opt.incsearch = true -- search as characters are entered
|
vim.opt.incsearch = true -- search as characters are entered
|
||||||
@@ -66,49 +66,40 @@ else
|
|||||||
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
|
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
|
||||||
|
|
||||||
-- Tab
|
-- Tab
|
||||||
vim.opt.tabstop = 4 -- number of visual spaces per TAB
|
-- vim.opt.tabstop = 4 -- number of visual spaces per TAB
|
||||||
vim.opt.softtabstop = 4 -- number of spacesin tab when editing
|
-- vim.opt.softtabstop = 4 -- number of spacesin tab when editing
|
||||||
vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab
|
-- vim.opt.shiftwidth = 4 -- insert 4 spaces on a tab
|
||||||
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
|
-- vim.opt.expandtab = true -- tabs are spaces, mainly because of python
|
||||||
|
|
||||||
-- UI config
|
-- UI config
|
||||||
vim.opt.number = true -- show absolute number
|
-- vim.opt.number = true -- show absolute number
|
||||||
vim.opt.relativenumber = true -- add numbers to each line on the left side
|
-- 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.cursorline = true -- highlight cursor line underneath the cursor horizontally
|
||||||
vim.opt.splitbelow = true -- open new vertical split bottom
|
-- vim.opt.splitbelow = true -- open new vertical split bottom
|
||||||
vim.opt.splitright = true -- open new horizontal splits right
|
-- vim.opt.splitright = true -- open new horizontal splits right
|
||||||
vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
|
-- 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.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
|
||||||
|
|
||||||
vim.opt.wrap = false -- Wrapping sucks (except on markdown)
|
-- vim.opt.wrap = false -- Wrapping sucks (except on markdown)
|
||||||
vim.opt.swapfile = false -- Do not leave any backup files
|
-- vim.opt.swapfile = false -- Do not leave any backup files
|
||||||
vim.opt.showmatch = true -- Highlights the matching parenthesis
|
-- vim.opt.showmatch = true -- Highlights the matching parenthesis
|
||||||
vim.opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text
|
-- vim.opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text
|
||||||
vim.opt.hidden = true -- Allow multple buffers
|
-- vim.opt.hidden = true -- Allow multple buffers
|
||||||
vim.opt.shortmess:append("c") -- Don't pass messages to |ins-completion-menu|.
|
-- vim.opt.shortmess:append("c") -- Don't pass messages to |ins-completion-menu|.
|
||||||
vim.opt.encoding = "utf-8" -- Just in case
|
-- vim.opt.encoding = "utf-8" -- Just in case
|
||||||
vim.opt.cmdheight = 2 -- Shows better messages
|
-- vim.opt.cmdheight = 2 -- Shows better messages
|
||||||
|
|
||||||
vim.opt.foldmethod = "indent"
|
-- vim.opt.foldmethod = "indent"
|
||||||
vim.opt.foldlevel = 99
|
-- vim.opt.foldlevel = 99
|
||||||
|
|
||||||
vim.opt.swapfile = false
|
-- vim.opt.swapfile = false
|
||||||
vim.opt.backup = false
|
-- vim.opt.backup = false
|
||||||
vim.opt.undofile = false
|
-- vim.opt.undofile = false
|
||||||
vim.opt.writebackup = false
|
-- vim.opt.writebackup = false
|
||||||
|
|
||||||
vim.g.mapleader = " " -- set leader key to space
|
vim.g.mapleader = " " -- set leader key to space
|
||||||
vim.g.maplocalleader = " " -- set local 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
|
|
||||||
|
|
||||||
local fold = {
|
local fold = {
|
||||||
unfoldAll = function()
|
unfoldAll = function()
|
||||||
vim.fn.VSCodeNotify("editor.unfoldAll")
|
vim.fn.VSCodeNotify("editor.unfoldAll")
|
||||||
|
@@ -1,3 +1,18 @@
|
|||||||
-- Options are automatically loaded before lazy.nvim startup
|
-- 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
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
-- Add any additional options here
|
-- Add any additional options here
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
-- 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
|
||||||
|
@@ -1,17 +1,19 @@
|
|||||||
return{
|
return {
|
||||||
{
|
{
|
||||||
"folke/flash.nvim",
|
"folke/flash.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
---@type Flash.Config
|
---@type Flash.Config
|
||||||
opts = {},
|
opts = {},
|
||||||
modes = {search = {enabled = true}},
|
modes = { search = { enabled = true } },
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
keys = {
|
keys = {
|
||||||
|
{ "s", mode = { "n", "x", "o" }, false },
|
||||||
|
{ "S", mode = { "n", "o", "x" }, false },
|
||||||
|
{ "r", mode = "o", false },
|
||||||
|
{ "R", mode = { "o", "x" }, false },
|
||||||
|
{ "<c-s>", mode = { "c" }, false },
|
||||||
{ "<leader>j", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
{ "<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>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,14 +1,14 @@
|
|||||||
return {
|
return {
|
||||||
--[[ {"vim-neo-tree/neo-tree.nvim", enabled = false},
|
-- { "vim-neo-tree/neo-tree.nvim", enabled = false },
|
||||||
{
|
-- {
|
||||||
"nvim-tree/nvim-tree.lua",
|
-- "nvim-tree/nvim-tree.lua",
|
||||||
version = "*",
|
-- version = "*",
|
||||||
lazy = false,
|
-- lazy = false,
|
||||||
dependencies = {
|
-- dependencies = {
|
||||||
"nvim-tree/nvim-web-devicons",
|
-- "nvim-tree/nvim-web-devicons",
|
||||||
},
|
-- },
|
||||||
config = function()
|
-- config = function()
|
||||||
require("nvim-tree").setup {}
|
-- require("nvim-tree").setup {}
|
||||||
end,
|
-- end,
|
||||||
} ]]
|
-- }
|
||||||
}
|
}
|
Reference in New Issue
Block a user