feat(nvim): I didn't remember
This commit is contained in:
1 parent
de4990f75a
commit
cf61fe2dd4
11 files changed
+64
-80
No files matched your search
@@ -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" })
|
||||
|
||||
@@ -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
|
||||
@@ -6,9 +6,6 @@ return {
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>ccc", "<cmd>CompilerOpen<cr>", desc = "Open Compiler" },
|
||||
{ "<leader>ccR", function() vim.cmd("CompilerStop") vim.cmd("CompilerRedo") end, desc = "Redo Compiler" },
|
||||
{ "<leader>ccr", "<cmd>CompilerToggleResults<cr>", desc = "Toggle Compiler Results" },
|
||||
{ "<F3>", "<cmd>CompilerOpen<cr>", desc = "Open Compiler" },
|
||||
{ "<S-F3>", function() vim.cmd("CompilerStop") vim.cmd("CompilerRedo") end, desc = "Redo Compiler" },
|
||||
{ "<F4>", "<cmd>CompilerToggleResults<cr>", desc = "Toggle Compiler Results" },
|
||||
@@ -40,12 +37,4 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
defaults = {
|
||||
["<leader>cc"] = { name = "compiler" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -34,7 +34,22 @@ return {
|
||||
template = "_data_/templates/journal/daily_entry.md",
|
||||
},
|
||||
|
||||
mappings = {},
|
||||
mappings = {
|
||||
-- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
|
||||
["gf"] = {
|
||||
action = function()
|
||||
return require("obsidian").util.gf_passthrough()
|
||||
end,
|
||||
opts = { noremap = false, expr = true, buffer = true },
|
||||
},
|
||||
-- Toggle check-boxes.
|
||||
["<C-c>"] = {
|
||||
action = function()
|
||||
return require("obsidian").util.toggle_checkbox()
|
||||
end,
|
||||
opts = { buffer = true },
|
||||
},
|
||||
},
|
||||
|
||||
templates = {
|
||||
subdir = "_data_/templates",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
return {
|
||||
"barrett-ruth/import-cost.nvim",
|
||||
build = "sh install.sh yarn",
|
||||
build = "sh install.sh npm",
|
||||
event = "LazyFile",
|
||||
config = true,
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
---@type string
|
||||
local xdg_config = vim.env.XDG_CONFIG_HOME or vim.env.HOME .. "/.config"
|
||||
|
||||
---@param path string
|
||||
local function have(path)
|
||||
return vim.loop.fs_stat(xdg_config .. "/" .. path) ~= nil
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
import = "lazyvim.plugins.extras.util.dot",
|
||||
},
|
||||
{
|
||||
"luckasRanarison/tree-sitter-hypr",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"luckasRanarison/tree-sitter-hyprlang",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if have("hypr") then
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "hyprlang" })
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
enabled = function()
|
||||
return have("hypr")
|
||||
end,
|
||||
event = "BufRead */hypr/*.conf",
|
||||
build = ":TSUpdate hyprlang",
|
||||
},
|
||||
}
|
||||
@@ -40,6 +40,7 @@ Config.options.defaults.cond = function(plugin)
|
||||
end
|
||||
|
||||
vim.o.spell = false
|
||||
vim.opt.timeoutlen = 0 -- To show whichkey without delay
|
||||
vim.notify = vscode.notify
|
||||
vim.g.clipboard = vim.g.vscode_clipboard
|
||||
|
||||
@@ -53,10 +54,6 @@ end
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimKeymaps",
|
||||
callback = function()
|
||||
-- find file
|
||||
map("n", "<leader><space>", "<cmd>Find<cr>")
|
||||
-- find in files
|
||||
map("n", "<leader>/", vscode_action("workbench.action.findInFiles"))
|
||||
-- view problems
|
||||
map("n", "<leader>xx", vscode_action("workbench.actions.view.problems"))
|
||||
-- open file explorer
|
||||
@@ -76,6 +73,8 @@ vim.api.nvim_create_autocmd("User", {
|
||||
map("n", "H", vscode_action("workbench.action.previousEditorInGroup"))
|
||||
map("n", "L", vscode_action("workbench.action.nextEditorInGroup"))
|
||||
map("n", "<leader>bd", vscode_action("workbench.action.closeActiveEditor"))
|
||||
map("n", "<leader><tab>", vscode_action("workbench.action.showMultipleEditorTabs"))
|
||||
map("n", "<leader><s-tab>", vscode_action("workbench.action.showEditorTab"))
|
||||
-- breakpoints
|
||||
map("n", "<F2>", vscode_action("editor.debug.action.toggleBreakpoint"))
|
||||
-- windows
|
||||
@@ -138,6 +137,16 @@ vim.api.nvim_create_autocmd("User", {
|
||||
map("n", "[d", vscode_action("editor.action.marker.prev"))
|
||||
-- whichkey
|
||||
map("n", "<leader>", vscode_action("whichkey.show"))
|
||||
-- search
|
||||
map("n", "<leader><space>", "<cmd>Find<cr>")
|
||||
map("n", "<leader>ff", "<cmd>Find<cr>")
|
||||
map("n", "<leader>/", vscode_action("workbench.action.findInFiles"))
|
||||
map("n", "<leader>sg", vscode_action("workbench.action.findInFiles"))
|
||||
map("n", "<leader>sc", vscode_action("workbench.action.showCommands"))
|
||||
-- format
|
||||
map("n", "<leader>cf", vscode_action("editor.action.formatDocument"))
|
||||
-- ui
|
||||
map("n", "<leader>uC", vscode_action("workbench.action.selectTheme"))
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ return {
|
||||
},
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
{ "<leader>ub", "<cmd>Gitsigns toggle_current_line_blame<CR>", desc = "Toggle Line Blame" },
|
||||
{ "<leader>ghd", "<cmd>Gitsigns toggle_deleted<CR>", desc = "Deletions Inline" },
|
||||
{ "<leader>uB", "<cmd>Gitsigns toggle_current_line_blame<CR>", desc = "Toggle Line Blame" },
|
||||
{ "<leader>ghe", "<cmd>Gitsigns toggle_deleted<CR>", desc = "Deletions Inline" },
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user