mirror of
https://github.com/jessebot/dot_files.git
synced 2025-10-01 01:48:43 +00:00
move more key mappings to keymap file, get rid of folding file
This commit is contained in:
parent
5c241ff3d6
commit
e4caa51316
5 changed files with 35 additions and 53 deletions
|
@ -32,17 +32,6 @@ require('user.lazy')
|
|||
-- starting page for neovim
|
||||
require('user.dashboard')
|
||||
|
||||
-- completion from nvim-cmp
|
||||
require('user.completion')
|
||||
|
||||
-- Language Server configs and other syntax checking and highlight tools
|
||||
require('user.lsp-configs')
|
||||
require('user.tree-sitter')
|
||||
|
||||
-- folding and indentation
|
||||
require('user.folding')
|
||||
require('user.indent')
|
||||
|
||||
-- tab line at top of window for tabs when there's more than one tab :) -- might switch to bufferline
|
||||
require('user.barbar')
|
||||
-- status line at bottom of window for cool file facts
|
||||
|
@ -58,8 +47,18 @@ require("user.scrollbar")
|
|||
-- floating windows
|
||||
require('user.fterm')
|
||||
|
||||
-- syntax highlighting for hex codes
|
||||
require('user.nvim-colorizer')
|
||||
|
||||
-- dim inactive windows
|
||||
require("tint").setup()
|
||||
|
||||
-- Language Server configs and other syntax checking and highlight tools
|
||||
require('user.lsp-configs')
|
||||
require('user.tree-sitter')
|
||||
|
||||
-- folding and indentation
|
||||
require('user.indent')
|
||||
|
||||
-- completion from nvim-cmp
|
||||
require('user.completion')
|
||||
|
||||
-- syntax highlighting for hex codes
|
||||
require('user.nvim-colorizer')
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
-- FOLDING ZONE:
|
||||
-- collapse an entire block or function
|
||||
-- ---------------------------------------------------------------------------
|
||||
|
||||
-- also allow me to see the doc strings
|
||||
-- vim.g.SimpylFold_docstring_preview=1
|
||||
-- enable folding for markdown?
|
||||
-- vim.g.markdown_folding = 1
|
||||
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldlevelstart = 99
|
||||
|
||||
-- let spacebar allow me to fold the code
|
||||
vim.keymap.set('n', '<enter>', 'za')
|
|
@ -29,10 +29,6 @@ vim.api.nvim_create_user_command(
|
|||
{ bang = true }
|
||||
)
|
||||
|
||||
-- Use this to toggle cmatrix in a floating terminal
|
||||
-- normal mode keys: <Space> + M
|
||||
vim.keymap.set('n', '<leader>M', '<cmd>Matrix<cr>', { desc = "c the matrix " })
|
||||
|
||||
|
||||
-- ---------------------------- open gitui -----------------------------------
|
||||
-- gitui must be installed beforehand with brew install gitui
|
||||
|
@ -54,9 +50,6 @@ vim.api.nvim_create_user_command(
|
|||
{ bang = true }
|
||||
)
|
||||
|
||||
-- Use this to toggle gitui in a floating terminal
|
||||
-- normal mode keys: <Space> + g
|
||||
vim.keymap.set('n', '<leader>g', '<cmd>Gitui<cr>', { desc = "Git TUI " })
|
||||
|
||||
-- ------------------------------ open k9s -----------------------------------
|
||||
-- install k9s beforehand: https://k9scli.io/topics/install/
|
||||
|
@ -69,13 +62,6 @@ local k9s = fterm:new({
|
|||
}
|
||||
})
|
||||
|
||||
-- Use this to toggle k9s in a floating terminal
|
||||
-- firt arg of 'n' is for normal mode
|
||||
-- <A-b> are keys: Alt + b (alt is option on macOS)
|
||||
vim.keymap.set('n', '<A-b>', function()
|
||||
k9s:toggle()
|
||||
end)
|
||||
|
||||
vim.api.nvim_create_user_command(
|
||||
'K9s',
|
||||
function()
|
||||
|
@ -83,7 +69,3 @@ vim.api.nvim_create_user_command(
|
|||
end,
|
||||
{ bang = true }
|
||||
)
|
||||
|
||||
-- Use this to toggle k9s in a floating terminal
|
||||
-- normal mode keys: <Space> + k
|
||||
vim.keymap.set('n', '<leader>k', '<cmd>K9s<cr>', { desc = "k9s - kubernetes dashboard TUI " })
|
||||
|
|
|
@ -1,9 +1,20 @@
|
|||
-- map leader to <Space>
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- keymappings
|
||||
-- ---------------------- fterm windows ----------------------------
|
||||
-- cmatrix
|
||||
vim.keymap.set('n', '<leader>M', '<cmd>Matrix<cr>', { desc = "c the matrix " })
|
||||
-- gitui
|
||||
vim.keymap.set('n', '<leader>g', '<cmd>Gitui<cr>', { desc = "Git TUI " })
|
||||
-- k9s
|
||||
vim.keymap.set('n', '<leader>K', '<cmd>K9s<cr>', { desc = "k9s - kubernetes dashboard TUI " })
|
||||
|
||||
-- ---------------------- Telescope windows ----------------------------
|
||||
vim.keymap.set('n', "<leader>:", "<cmd>Telescope commands<cr>", { desc = "All Commands" })
|
||||
vim.keymap.set('n', '<leader>H', '<cmd>Telescope highlights<CR>', { desc = "Telescope for highlight groups in current buffer" })
|
||||
vim.keymap.set('n', '<leader>h', '<cmd>Telescope command_history<CR>', { desc = "Telescope for command history" })
|
||||
vim.keymap.set('n', "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Find Files (cwd)" })
|
||||
vim.keymap.set('n', "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Files Recently Opened in Neovim" })
|
||||
|
||||
-- enter to fold code (collapses code block)
|
||||
vim.keymap.set('n', '<enter>', 'za')
|
||||
|
|
|
@ -26,8 +26,6 @@ local plugins = {
|
|||
end,
|
||||
},
|
||||
|
||||
{ 'nvim-tree/nvim-web-devicons', lazy = true },
|
||||
|
||||
-- -------------------- startup screen for neovim ------------------------
|
||||
{'glepnir/dashboard-nvim',
|
||||
event = 'VimEnter',
|
||||
|
@ -128,11 +126,16 @@ local plugins = {
|
|||
|
||||
-- ---------------- syntax highlighting installer ------------------------
|
||||
|
||||
{'nvim-treesitter/nvim-treesitter'},
|
||||
{'nvim-treesitter/nvim-treesitter',
|
||||
config = function()
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldlevelstart = 99
|
||||
end,
|
||||
},
|
||||
-- I have this mostly for the :TSHighlightCapturesUnderCursor command
|
||||
-- https://github.com/nvim-treesitter/playground/pull/9
|
||||
{'nvim-treesitter/playground',
|
||||
lazy = true,
|
||||
cmd = 'TSHighlightCapturesUnderCursor',
|
||||
},
|
||||
|
||||
|
@ -229,6 +232,9 @@ local plugins = {
|
|||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{ 'nvim-tree/nvim-web-devicons', lazy = true },
|
||||
|
||||
}
|
||||
|
||||
require("lazy").setup(plugins)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue