feat(nvim): I didn't remember

This commit is contained in:
sankalp committed 2024-01-23 19:31:15 +05:45
1 parent de4990f75a
commit cf61fe2dd4
11 files changed
+64 -80

No files matched your search

+13 -7
View File
@@ -2,6 +2,7 @@
-- 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 o = vim.opt
local Util = require("lazyvim.util")
@@ -21,10 +22,6 @@ map("n", "<leader>lc", function() Util.news.changelog() end, { desc = "LazyVim C
-- stylua: ignore end
map("n", "<leader>L", "<Nop>")
-- Toggle background
-- stylua: ignore
map("n", "<leader>uB", function() Util.toggle("background", false, { "light", "dark" }) end, { desc = "Toggle Background" })
-- Identation
map("n", "<", "<<", { desc = "Deindent" })
map("n", ">", ">>", { desc = "Indent" })
@@ -65,13 +62,22 @@ map("n", "N", "Nzzzv")
-- Toggle statusline
map("n", "<leader>uS", function()
if vim.opt.laststatus:get() == 0 then
vim.opt.laststatus = 3
if o.laststatus:get() == 0 then
o.laststatus = 3
else
vim.opt.laststatus = 0
o.laststatus = 0
end
end, { desc = "Toggle Statusline" })
-- Toggle tabline
map("n", "<leader>u<tab>", function()
if o.showtabline:get() == 0 then
o.showtabline = 2
else
o.showtabline = 0
end
end, { desc = "Toggle Tabline" })
-- Plugin Info
map("n", "<leader>cif", "<cmd>LazyFormatInfo<cr>", { desc = "Formatting" })
map("n", "<leader>cic", "<cmd>ConformInfo<cr>", { desc = "Conform" })
+8 -8
View File
@@ -1,22 +1,22 @@
-- 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
local opt = vim.g
local o = vim.g
-- Optimizations on startup
vim.loader.enable()
-- Define leader key
opt.mapleader = " "
opt.maplocalleader = "\\"
o.mapleader = " "
o.maplocalleader = "\\"
-- Autoformat on save (Global)
opt.autoformat = true
o.autoformat = true
-- Font
opt.gui_font_default_size = 10
opt.gui_font_size = opt.gui_font_default_size
opt.gui_font_face = "JetBrainsMono Nerd Font"
o.gui_font_default_size = 10
o.gui_font_size = o.gui_font_default_size
o.gui_font_face = "JetBrainsMono Nerd Font"
-- Enable EditorConfig integration
opt.editorconfig = true
o.editorconfig = true