From 4d8ed2a1c9ec2233ed18cc2e1f3a046849181338 Mon Sep 17 00:00:00 2001 From: Skylar Hill Date: Wed, 14 Feb 2024 18:03:44 -0600 Subject: [PATCH] Initial commit --- init.lua | 3 +++ mappings.lua | 24 ++++++++++++++++++++++++ plugins/community.lua | 9 +++++++++ plugins/hardtime.lua | 39 +++++++++++++++++++++++++++++++++++++++ plugins/nvim-surround.lua | 10 ++++++++++ plugins/zk-nvim.lua | 23 +++++++++++++++++++++++ 6 files changed, 108 insertions(+) create mode 100644 init.lua create mode 100644 mappings.lua create mode 100644 plugins/community.lua create mode 100644 plugins/hardtime.lua create mode 100644 plugins/nvim-surround.lua create mode 100644 plugins/zk-nvim.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..fcff0e9 --- /dev/null +++ b/init.lua @@ -0,0 +1,3 @@ +return { + colorscheme = "catppuccin-mocha" +} diff --git a/mappings.lua b/mappings.lua new file mode 100644 index 0000000..4bf1f53 --- /dev/null +++ b/mappings.lua @@ -0,0 +1,24 @@ +local Terminal = require('toggleterm.terminal').Terminal +local bacon = Terminal:new({ cmd = "bacon", hidden = true }) +local entangled = Terminal:new({ cmd = "entangled watch", hidden = true }) + +function _bacon_toggle() + bacon.dir = vim.fn.expand("%:h") + bacon:toggle() +end + +function _entangled_toggle() + entangled.dir = vim.fn.expand("%:h") + entangled:toggle() +end + +return { + n = { + ["Z"] = { name = "zk" }, + ["Zi"] = { ":ZkIndex", desc = "Index notes" }, + ["Zn"] = { ":ZkNew", desc = "New note" }, + ["Zs"] = { ":ZnNotes", desc = "Search notes" }, + ["tb"] = { _bacon_toggle, desc = "ToggleTerm bacon "}, + ["te"] = { _entangled_toggle, desc = "ToggleTerm entangled" }, + } +} diff --git a/plugins/community.lua b/plugins/community.lua new file mode 100644 index 0000000..7313110 --- /dev/null +++ b/plugins/community.lua @@ -0,0 +1,9 @@ +return { + "AstroNvim/astrocommunity", + { import = "astrocommunity.pack.rust" }, + { import = "astrocommunity.pack.markdown" }, + { import = "astrocommunity.pack.html-css" }, + { import = "astrocommunity.colorscheme.catppuccin" }, + { import = "astrocommunity.note-taking.zk-nvim" }, + { import = "astrocommunity.workflow.hardtime-nvim" }, +} diff --git a/plugins/hardtime.lua b/plugins/hardtime.lua new file mode 100644 index 0000000..46ac8a4 --- /dev/null +++ b/plugins/hardtime.lua @@ -0,0 +1,39 @@ +return { + "m4xshen/hardtime.nvim", + opts = { + disabled_keys = { + [""] = {}, + [""] = {}, + [""] = {}, + [""] = {}, + [""] = {}, + [""] = {}, + }, + restricted_keys = { + [""] = { "n", "i", "x" }, + [""] = { "n", "i", "x" }, + [""] = { "n", "i", "x" }, + [""] = { "n", "i", "x" }, + [""] = { "i" }, + [""] = { "i" }, + }, + hints = { + ["a"] = { + message = function() + return "Use A insead of a" + end, + length = 6, + }, + ["ddO"] = { + message = function() + return "Use cc instead of ddO" + end, + length = 3, + } + } + }, + config = function(_, opts) + require("hardtime").setup(opts) + require("hardtime").enable() + end +} diff --git a/plugins/nvim-surround.lua b/plugins/nvim-surround.lua new file mode 100644 index 0000000..3df14c8 --- /dev/null +++ b/plugins/nvim-surround.lua @@ -0,0 +1,10 @@ +return { + "kylechui/nvim-surround", + version = "*", -- Use for stability; omit to use `main` branch for the latest features + event = "VeryLazy", + config = function() + require("nvim-surround").setup({ + -- Configuration here, or leave empty to use defaults + }) + end +} diff --git a/plugins/zk-nvim.lua b/plugins/zk-nvim.lua new file mode 100644 index 0000000..f35ca00 --- /dev/null +++ b/plugins/zk-nvim.lua @@ -0,0 +1,23 @@ +local utils = require "astronvim.utils" + +return { + { + "mickael-menu/zk-nvim", + opts = { + picker = "telescope", + }, + cmd = { "ZkNew", "ZkIndex", "ZkNewFromTitleSelection", + "ZkNewFromContentSelection", "ZkCd", "ZkNotes", + "ZkBacklinks", "ZkLinks", "ZkInsertLink", + "ZkInsertLinkAtSelection", "ZkMatch", "ZkTags" }, + config = function(_, opts) + require("zk").setup(opts) + require("zk").enable() + end, + }, + + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "zk") end, + }, +}