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

@@ -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",
},
}
+13 -4
View File
@@ -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,
})
+2 -2
View File
@@ -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" },
},
}