Massive Updates
This commit is contained in:
1 parent
007c2f8edb
commit
5f37d6c0ec
109 files changed
+7670
-3972
No files matched your search
@@ -2,11 +2,12 @@
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
local map = vim.keymap.set
|
||||
|
||||
local Util = require("lazyvim.util")
|
||||
|
||||
-- Search current word
|
||||
local searching_brave =
|
||||
[[:lua vim.fn.system({'xdg-open', 'https://search.brave.com/search?q=' .. vim.fn.expand("<cword>")})<CR>]]
|
||||
-- stylua: ignore
|
||||
local searching_brave = [[:lua vim.fn.system({'xdg-open', 'https://search.brave.com/search?q=' .. vim.fn.expand("<cword>")})<CR>]]
|
||||
map("n", "<leader>?", searching_brave, { noremap = true, silent = true, desc = "Search current word on brave search" })
|
||||
|
||||
-- Toggle background
|
||||
@@ -27,6 +28,15 @@ map("n", "-", "<C-x>")
|
||||
-- Tabs
|
||||
map("n", "]<tab>", "<cmd>tabnext<cr>", { desc = "Next Tab" })
|
||||
map("n", "[<tab>", "<cmd>tabprevious<cr>", { desc = "Previous Tab" })
|
||||
map("n", "<leader><tab>1", "<cmd>tabn 1<cr>", { desc = "Tab 1" })
|
||||
map("n", "<leader><tab>2", "<cmd>tabn 2<cr>", { desc = "Tab 2" })
|
||||
map("n", "<leader><tab>3", "<cmd>tabn 3<cr>", { desc = "Tab 3" })
|
||||
map("n", "<leader><tab>4", "<cmd>tabn 4<cr>", { desc = "Tab 4" })
|
||||
map("n", "<leader><tab>5", "<cmd>tabn 5<cr>", { desc = "Tab 5" })
|
||||
map("n", "<leader><tab>6", "<cmd>tabn 6<cr>", { desc = "Tab 6" })
|
||||
map("n", "<leader><tab>7", "<cmd>tabn 7<cr>", { desc = "Tab 7" })
|
||||
map("n", "<leader><tab>8", "<cmd>tabn 8<cr>", { desc = "Tab 8" })
|
||||
map("n", "<leader><tab>9", "<cmd>tabn 9<cr>", { desc = "Tab 9" })
|
||||
|
||||
-- Buffers
|
||||
map("n", "<leader>bf", "<cmd>bfirst<cr>", { desc = "First Buffer" })
|
||||
@@ -63,6 +73,11 @@ map("n", "<a-l>", "$", { desc = "Last character of Line" })
|
||||
-- Copy whole text to clipboard
|
||||
map("n", "<C-c>", ":%y+<CR>", { desc = "Copy whole text to clipboard", silent = true })
|
||||
|
||||
-- Motion
|
||||
map("c", "<C-a>", "<C-b>", { desc = "Start Of Line" })
|
||||
map("i", "<C-a>", "<Home>", { desc = "Start Of Line" })
|
||||
map("i", "<C-e>", "<End>", { desc = "End Of Line" })
|
||||
|
||||
-- Select all text
|
||||
map("n", "<C-a>", "gg<S-V>G", { desc = "Select all text", silent = true, noremap = true })
|
||||
|
||||
@@ -70,6 +85,10 @@ map("n", "<C-a>", "gg<S-V>G", { desc = "Select all text", silent = true, noremap
|
||||
map("i", "<C-v>", '<C-r>"', { desc = "Paste on insert mode" })
|
||||
map("v", "p", '"_dP', { desc = "Paste without overwriting" })
|
||||
|
||||
-- Delete and change without yanking
|
||||
map({ "n", "x" }, "<A-d>", '"_d', { desc = "Delete without yanking" })
|
||||
map({ "n", "x" }, "<A-c>", '"_c', { desc = "Change without yanking" })
|
||||
|
||||
-- Deleting without yanking empty line
|
||||
map("n", "dd", function()
|
||||
local is_empty_line = vim.api.nvim_get_current_line():match("^%s*$")
|
||||
@@ -161,12 +180,4 @@ if package.loaded["cinnamon"] then
|
||||
map({ "n", "x" }, "l", "<Cmd>lua Scroll('l', 0, 1)<CR>")
|
||||
map({ "n", "x" }, "<Left>", "<Cmd>lua Scroll('h', 0, 1)<CR>")
|
||||
map({ "n", "x" }, "<Right>", "<Cmd>lua Scroll('l', 0, 1)<CR>")
|
||||
|
||||
-- LSP_KEYMAPS:
|
||||
|
||||
-- LSP go-to-definition:
|
||||
map("n", "gd", "<Cmd>lua Scroll('definition')<CR>")
|
||||
|
||||
-- LSP go-to-declaration:
|
||||
map("n", "gD", "<Cmd>lua Scroll('declaration')<CR>")
|
||||
end
|
||||
@@ -1,37 +0,0 @@
|
||||
if not vim.g.neovide then
|
||||
return
|
||||
end
|
||||
|
||||
RefreshGuiFont = function()
|
||||
vim.opt.guifont = string.format("%s:h%s", vim.g.gui_font_face, vim.g.gui_font_size)
|
||||
end
|
||||
|
||||
ResizeGuiFont = function(delta)
|
||||
vim.g.gui_font_size = vim.g.gui_font_size + delta
|
||||
RefreshGuiFont()
|
||||
end
|
||||
|
||||
-- Keymaps
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.keymap.set({ "n", "i" }, "<C-+>", function()
|
||||
ResizeGuiFont(1)
|
||||
end, opts)
|
||||
vim.keymap.set({ "n", "i" }, "<C-->", function()
|
||||
ResizeGuiFont(-1)
|
||||
end, opts)
|
||||
|
||||
vim.g.neovide_padding_top = 5
|
||||
vim.g.neovide_padding_right = 5
|
||||
vim.g.neovide_padding_left = 5
|
||||
|
||||
vim.g.neovide_floating_blur_amount_x = 5.0
|
||||
vim.g.neovide_floating_blur_amount_y = 5.0
|
||||
|
||||
vim.g.neovide_transparency = 0.85
|
||||
|
||||
vim.g.neovide_cursor_antialiasing = false
|
||||
|
||||
vim.g.neovide_cursor_vfx_mode = "pixiedust"
|
||||
|
||||
vim.opt.winblend = 20
|
||||
@@ -1,16 +1,18 @@
|
||||
-- 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
|
||||
-- Neovide options
|
||||
require("config.neovide")
|
||||
local opt = vim.g
|
||||
|
||||
-- Optimizations on startup
|
||||
vim.loader.enable()
|
||||
|
||||
-- Font
|
||||
vim.g.gui_font_default_size = 10
|
||||
vim.g.gui_font_size = vim.g.gui_font_default_size
|
||||
vim.g.gui_font_face = "JetBrainsMono Nerd Font"
|
||||
opt.gui_font_default_size = 10
|
||||
opt.gui_font_size = opt.gui_font_default_size
|
||||
opt.gui_font_face = "JetBrainsMono Nerd Font"
|
||||
|
||||
-- Define leader key
|
||||
vim.g.mapleader = " "
|
||||
opt.mapleader = " "
|
||||
|
||||
-- Enable EditorConfig integration
|
||||
opt.editorconfig = true
|
||||
Reference in new issue
Block a user