From e681db6172f4d3384ee5049d91b9b0425334a780 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Thu, 25 Aug 2022 00:10:09 +0300 Subject: [PATCH 1/5] Treesitter using paq I guess --- .envrc | 1 - dotfiles/neovim/lua/my/paq.lua | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 .envrc diff --git a/.envrc b/.envrc deleted file mode 100644 index b1a5883..0000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -export PATH="~/.PNPM_HOME:$PATH" diff --git a/dotfiles/neovim/lua/my/paq.lua b/dotfiles/neovim/lua/my/paq.lua index 2bba4c7..28f3fb8 100644 --- a/dotfiles/neovim/lua/my/paq.lua +++ b/dotfiles/neovim/lua/my/paq.lua @@ -47,6 +47,8 @@ function M.setup() "ShinKage/idris2-nvim" -- idris2 support } + table.insert(base, "nvim-treesitter/nvim-treesitter") + for _, v in ipairs(themePackages) do -- append package in the base list table.insert(base, v) From 209dfd69985e49e02a05661aa744470400d48d4f Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Thu, 25 Aug 2022 11:10:46 +0300 Subject: [PATCH 2/5] Install treesitter on mac only --- dotfiles/neovim/lua/my/paq.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dotfiles/neovim/lua/my/paq.lua b/dotfiles/neovim/lua/my/paq.lua index 3c5c9d4..de9f3be 100644 --- a/dotfiles/neovim/lua/my/paq.lua +++ b/dotfiles/neovim/lua/my/paq.lua @@ -4,14 +4,12 @@ function M.setup() local paq = require("paq") local themePackages = require("my.theme").deps local base = { + "nvim-lua/plenary.nvim", -- async utility lib it seems? "neovim/nvim-lspconfig", -- configures lsps for me "windwp/nvim-autopairs", -- closes pairs for me (should look for a better one) - "nvim-lua/plenary.nvim", -- async utility lib it seems? "nvim-telescope/telescope.nvim", -- fuzzy search for say opening files "purescript-contrib/purescript-vim", -- purescript support "terrortylor/nvim-comment", -- allows toggling line comments - -- This gets installed by nix now! - -- {"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"}, -- use treesitter for syntax highlighting "nvim-treesitter/nvim-treesitter-textobjects", -- the lean plugin wants me to install this, lol -- "startup-nvim/startup.nvim", -- splash screen "glepnir/dashboard-nvim", -- similar to startup.nvim @@ -54,7 +52,10 @@ function M.setup() "TimUntersberger/neogit" -- magit clone } - table.insert(base, "nvim-treesitter/nvim-treesitter") + -- This might get installed by nix! + if os.getenv("NVIM_INSTALL_TREESITTER") then + table.insert(base, 2, { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }) + end for _, v in ipairs(themePackages) do -- append package in the base list From 8370825e23bbb20fd1eedfe7dce24866861a26aa Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Thu, 25 Aug 2022 11:14:50 +0300 Subject: [PATCH 3/5] Added dressing --- dotfiles/neovim/lua/my/paq.lua | 2 ++ dotfiles/neovim/lua/my/plugins/init.lua | 1 + 2 files changed, 3 insertions(+) diff --git a/dotfiles/neovim/lua/my/paq.lua b/dotfiles/neovim/lua/my/paq.lua index de9f3be..2d37718 100644 --- a/dotfiles/neovim/lua/my/paq.lua +++ b/dotfiles/neovim/lua/my/paq.lua @@ -47,6 +47,8 @@ function M.setup() "udalov/kotlin-vim", -- kotlin support "haringsrob/nvim_context_vt", -- show context on closing parenthesis "vuki656/package-info.nvim", -- shows latest versions in package.json + "stevearc/dressing.nvim", -- better ui I guess + -- Git stuff "ruifm/gitlinker.nvim", -- generate permalinks for code "TimUntersberger/neogit" -- magit clone diff --git a/dotfiles/neovim/lua/my/plugins/init.lua b/dotfiles/neovim/lua/my/plugins/init.lua index bb85c39..baf0bd8 100644 --- a/dotfiles/neovim/lua/my/plugins/init.lua +++ b/dotfiles/neovim/lua/my/plugins/init.lua @@ -5,6 +5,7 @@ function M.setup() require('nvim-autopairs').setup() require "gitlinker".setup() require('nvim_comment').setup() + require('dressing').setup() vscode.unless(function() require("presence"):setup({}) From 7eac376607211feebfbe91db897acfd54c3648ac Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Thu, 25 Aug 2022 11:26:00 +0300 Subject: [PATCH 4/5] Added paperplanes.nvim --- dotfiles/neovim/lua/my/paq.lua | 1 + dotfiles/neovim/lua/my/plugins/init.lua | 1 + dotfiles/neovim/lua/my/plugins/paperplanes.lua | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 dotfiles/neovim/lua/my/plugins/paperplanes.lua diff --git a/dotfiles/neovim/lua/my/paq.lua b/dotfiles/neovim/lua/my/paq.lua index 2d37718..93a7e91 100644 --- a/dotfiles/neovim/lua/my/paq.lua +++ b/dotfiles/neovim/lua/my/paq.lua @@ -48,6 +48,7 @@ function M.setup() "haringsrob/nvim_context_vt", -- show context on closing parenthesis "vuki656/package-info.nvim", -- shows latest versions in package.json "stevearc/dressing.nvim", -- better ui I guess + "rktjmp/paperplanes.nvim", -- export to pastebin like services -- Git stuff "ruifm/gitlinker.nvim", -- generate permalinks for code diff --git a/dotfiles/neovim/lua/my/plugins/init.lua b/dotfiles/neovim/lua/my/plugins/init.lua index baf0bd8..b31f738 100644 --- a/dotfiles/neovim/lua/my/plugins/init.lua +++ b/dotfiles/neovim/lua/my/plugins/init.lua @@ -21,6 +21,7 @@ function M.setup() require("my.plugins.vimux").setup() end) + require("my.plugins.paperplanes").setup() require("my.plugins.neogit").setup() require("my.plugins.telescope").setup() diff --git a/dotfiles/neovim/lua/my/plugins/paperplanes.lua b/dotfiles/neovim/lua/my/plugins/paperplanes.lua new file mode 100644 index 0000000..6736b5e --- /dev/null +++ b/dotfiles/neovim/lua/my/plugins/paperplanes.lua @@ -0,0 +1,9 @@ +local M = {} + +function M.setup() + require("paperplanes").setup({ + provider = "paste.rs" + }) +end + +return M From aece12290ba3935d85c07247d26dfaf9794a6748 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Thu, 25 Aug 2022 11:49:11 +0300 Subject: [PATCH 5/5] Added venn + hydra --- dotfiles/neovim/lua/my/paq.lua | 3 ++ dotfiles/neovim/lua/my/plugins/init.lua | 1 + dotfiles/neovim/lua/my/plugins/venn.lua | 38 +++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 dotfiles/neovim/lua/my/plugins/venn.lua diff --git a/dotfiles/neovim/lua/my/paq.lua b/dotfiles/neovim/lua/my/paq.lua index 93a7e91..0b8b6bb 100644 --- a/dotfiles/neovim/lua/my/paq.lua +++ b/dotfiles/neovim/lua/my/paq.lua @@ -1,5 +1,6 @@ local M = {} + function M.setup() local paq = require("paq") local themePackages = require("my.theme").deps @@ -49,6 +50,8 @@ function M.setup() "vuki656/package-info.nvim", -- shows latest versions in package.json "stevearc/dressing.nvim", -- better ui I guess "rktjmp/paperplanes.nvim", -- export to pastebin like services + "anuvyklack/hydra.nvim", -- keybinds where you only hit the head once + "jbyuki/venn.nvim", -- draw ascii diagrams -- Git stuff "ruifm/gitlinker.nvim", -- generate permalinks for code diff --git a/dotfiles/neovim/lua/my/plugins/init.lua b/dotfiles/neovim/lua/my/plugins/init.lua index b31f738..2d4d280 100644 --- a/dotfiles/neovim/lua/my/plugins/init.lua +++ b/dotfiles/neovim/lua/my/plugins/init.lua @@ -24,6 +24,7 @@ function M.setup() require("my.plugins.paperplanes").setup() require("my.plugins.neogit").setup() require("my.plugins.telescope").setup() + require("my.plugins.venn").setup() -- require("my.plugins.idris").setup() -- require("which-key").setup() diff --git a/dotfiles/neovim/lua/my/plugins/venn.lua b/dotfiles/neovim/lua/my/plugins/venn.lua new file mode 100644 index 0000000..c86d9aa --- /dev/null +++ b/dotfiles/neovim/lua/my/plugins/venn.lua @@ -0,0 +1,38 @@ +local M = {} +local hint = [[ + Arrow^^^^^^ Select region with + ^ ^ _K_ ^ ^ _f_: surround it with box + _H_ ^ ^ _L_ + ^ ^ _J_ ^ ^ __ +]] + +function M.setup() + local Hydra = require('hydra') + + Hydra({ + name = 'Draw Diagram', + hint = hint, + config = { + color = 'pink', + invoke_on_body = true, + hint = { + border = 'rounded' + }, + on_enter = function() + vim.o.virtualedit = 'all' + end, + }, + mode = 'n', + body = 'v', + heads = { + { 'H', 'h:VBox' }, + { 'J', 'j:VBox' }, + { 'K', 'k:VBox' }, + { 'L', 'l:VBox' }, + { 'f', ':VBox', { mode = 'v' } }, + { '', nil, { exit = true } }, + } + }) +end + +return M