diff options
author | Squibid <me@zacharyscheiman.com> | 2023-06-26 11:35:24 -0400 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2023-06-26 11:35:24 -0400 |
commit | 9e694c03721af13a31aedbfc365203cf66b370b4 (patch) | |
tree | 898c136e609a069b7342f5b438b8e85838a8bf7b | |
parent | d968ff639be3b6ecddb6ae224f3804f4eea566ba (diff) | |
download | nvim-9e694c03721af13a31aedbfc365203cf66b370b4.tar.gz nvim-9e694c03721af13a31aedbfc365203cf66b370b4.tar.bz2 nvim-9e694c03721af13a31aedbfc365203cf66b370b4.zip |
add plugin configs & mess with the binds
-rw-r--r-- | after/plugin/glance.lua | 30 | ||||
-rw-r--r-- | after/plugin/lightbulb.lua | 23 | ||||
-rw-r--r-- | after/plugin/todo-comments.lua | 18 | ||||
-rw-r--r-- | lua/core/binds.lua | 44 | ||||
-rw-r--r-- | lua/core/highlight.lua | 3 |
5 files changed, 92 insertions, 26 deletions
diff --git a/after/plugin/glance.lua b/after/plugin/glance.lua new file mode 100644 index 0000000..08f90d1 --- /dev/null +++ b/after/plugin/glance.lua @@ -0,0 +1,30 @@ +local status_ok, glance = pcall(require, "glance") +if not status_ok then + return +end + +local actions = glance.actions +glance.setup { + detached = function(winid) + return vim.api.nvim_win_get_width(winid) < 100 + end, + + border = { + enable = true, + top_char = '', + }, + theme = { + enable = false, + }, + folds = { + fold_closed = '>', + fold_open = 'V', + folded = true, + }, + indent_lines = { + enable = false, + }, + winbar = { + enable = true, + }, +} diff --git a/after/plugin/lightbulb.lua b/after/plugin/lightbulb.lua new file mode 100644 index 0000000..00fcfcc --- /dev/null +++ b/after/plugin/lightbulb.lua @@ -0,0 +1,23 @@ +local status_ok, lightbulb = pcall(require, "nvim-lightbulb") +if not status_ok then + return +end + +lightbulb.setup { + sign = { + enabled = true, + priority = 10000, -- make this really high so it always shows + }, + autocmd = { + enabled = true, + pattern = {"*"}, + events = {"CursorHold", "CursorHoldI"} + } +} + +vim.fn.sign_define('LightBulbSign', { + text = "f", + texthl = "LightBulbSignTxthl", + linehl="", + numhl="", +}) diff --git a/after/plugin/todo-comments.lua b/after/plugin/todo-comments.lua new file mode 100644 index 0000000..af67d49 --- /dev/null +++ b/after/plugin/todo-comments.lua @@ -0,0 +1,18 @@ +local status_ok, todocomments = pcall(require, "todo-comments") +if not status_ok then + return +end + +todocomments.setup { + keywords = { + FIX = { + icon = " ", -- icon used for the sign, and in search results + }, + TODO = { icon = " ", color = "info" }, + HACK = { icon = "* ", color = "warning" }, + WARN = { icon = "! ", color = "warning", alt = { "WARNING", "XXX" } }, + PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = "i ", color = "hint", alt = { "INFO" } }, + TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, + }, +} diff --git a/lua/core/binds.lua b/lua/core/binds.lua index 66a2af5..0783615 100644 --- a/lua/core/binds.lua +++ b/lua/core/binds.lua @@ -69,43 +69,35 @@ map('n', 'gi', '<CMD>Glance implementations<CR>') local treesj = require('treesj') -- treesj map('n', '<leader>j', treesj.toggle) --- telescope -local telebuilt = require('telescope.builtin') +local telebuilt = require('telescope.builtin') -- telescope map('n', '<leader>sf', telebuilt.find_files) map('n', '<leader>sg', telebuilt.git_files) map('n', '<leader>sp', function() - telebuilt.grep_string({ search = vim.fn.input('Find string in project > ') }); + telebuilt.grep_string({ search = vim.fn.input('Find string in project > ') }) end) map('n', '<leader>so', telebuilt.oldfiles) --- intellitab -local intellitab = require('intellitab') +local intellitab = require('intellitab') -- intellitab map('n', '<Tab>', intellitab.indent) --- undo tree -map('n', '<leader>u', '<cmd>UndotreeToggle<CR>') +map('n', '<leader>u', '<cmd>UndotreeToggle<CR>') -- undo tree +map('n', '<leader>f', '<cmd>SFMToggle<CR>') -- sfm +map('n', '<leader>b', '<cmd>JABSOpen<CR>') -- switch between previous buffers +map('n', '<leader>tt', '<cmd>TroubleToggle<CR>') -- trouble (lsp error view) +map('n', '<leader>tc', '<cmd>TodoTrouble<CR>') -- todo trouble +map('n', '<C-e>', '<cmd>IconPickerYank<CR>') -- icon picker --- sfm -map('n', '<leader>f', '<cmd>SFMToggle<CR>') - --- dap ui -local dapui = require('dapui') +local dapui = require('dapui') -- dap ui map('n', '<leader>d', dapui.toggle) --- switch between previous buffers -map('n', '<leader>b', '<cmd>JABSOpen<CR>') - --- resizing buffers (toggleable) -local smartsplits = require('smart-splits') +local smartsplits = require('smart-splits') -- resizing buffers (toggleable) map('n', '<leader>r', smartsplits.start_resize_mode) --- trouble (lsp error view) -map('n', '<leader>t', '<cmd>TroubleToggle<CR>') - --- icon picker -map('n', '<C-e>', '<cmd>IconPickerYank<CR>') +-- toggle term (don't use leader key in these binds) +map({'n', 't'}, '<C-\\>', '<cmd>ToggleTerm direction=float<CR>') +map({'n', 't'}, '<C-g>', '<cmd>lua _glow()<CR>') --- toggle term -map('t', '<ESC>', '<C-\\><C-n>') -- make <ESC> work in terminals -map({'n', 't'}, '<C-\\>', '<cmd>ToggleTerm size=20<CR>') -map({'n', 't'}, '<leader>gl', '<cmd>lua _glow()<CR>') +-- true zen +map('n', '<leader>zf', '<cmd>lua require("true-zen.focus").toggle()<CR>') +map('n', '<leader>zm', '<cmd>lua require("true-zen.minimalist").toggle()<CR>') +map('n', '<leader>za', '<cmd>lua require("true-zen.ataraxis").toggle()<CR>') diff --git a/lua/core/highlight.lua b/lua/core/highlight.lua index 4cd4d55..d1f09db 100644 --- a/lua/core/highlight.lua +++ b/lua/core/highlight.lua @@ -41,3 +41,6 @@ highlight('AlphaHeader', { fg = c.blue }) -- fidget highlight('FidgetTask', { fg = c.fg }) + +-- quick fix sign +highlight('LightBulbSignTxthl', {fg = c.bright_magenta}) |