merge: add rename_term binding, keep td_mappings at top
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
cb928e6983
@ -1,4 +1,4 @@
|
|||||||
**This repo is supposed to used as config by NvChad users!**
|
**This repo is supposed to be used as config by NvChad users!**
|
||||||
|
|
||||||
- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo.
|
- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo.
|
||||||
- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"`
|
- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"`
|
||||||
|
|||||||
2
init.lua
2
init.lua
@ -30,7 +30,7 @@ dofile(vim.g.base46_cache .. "defaults")
|
|||||||
dofile(vim.g.base46_cache .. "statusline")
|
dofile(vim.g.base46_cache .. "statusline")
|
||||||
|
|
||||||
require "options"
|
require "options"
|
||||||
require "nvchad.autocmds"
|
require "autocmds"
|
||||||
|
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
require "mappings"
|
require "mappings"
|
||||||
|
|||||||
1
lua/autocmds.lua
Normal file
1
lua/autocmds.lua
Normal file
@ -0,0 +1 @@
|
|||||||
|
require "nvchad.autocmds"
|
||||||
@ -14,4 +14,11 @@ M.base46 = {
|
|||||||
-- },
|
-- },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- M.nvdash = { load_on_startup = true }
|
||||||
|
-- M.ui = {
|
||||||
|
-- tabufline = {
|
||||||
|
-- lazyload = false
|
||||||
|
-- }
|
||||||
|
-- }
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@ -1,24 +1,6 @@
|
|||||||
-- load defaults i.e lua_lsp
|
|
||||||
require("nvchad.configs.lspconfig").defaults()
|
require("nvchad.configs.lspconfig").defaults()
|
||||||
|
|
||||||
local lspconfig = require "lspconfig"
|
|
||||||
|
|
||||||
-- EXAMPLE
|
|
||||||
local servers = { "html", "cssls" }
|
local servers = { "html", "cssls" }
|
||||||
local nvlsp = require "nvchad.configs.lspconfig"
|
vim.lsp.enable(servers)
|
||||||
|
|
||||||
-- lsps with default config
|
-- read :h vim.lsp.config for changing options of lsp servers
|
||||||
for _, lsp in ipairs(servers) do
|
|
||||||
lspconfig[lsp].setup {
|
|
||||||
on_attach = nvlsp.on_attach,
|
|
||||||
on_init = nvlsp.on_init,
|
|
||||||
capabilities = nvlsp.capabilities,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- configuring single server, example: typescript
|
|
||||||
-- lspconfig.ts_ls.setup {
|
|
||||||
-- on_attach = nvlsp.on_attach,
|
|
||||||
-- on_init = nvlsp.on_init,
|
|
||||||
-- capabilities = nvlsp.capabilities,
|
|
||||||
-- }
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
require "nvchad.mappings"
|
require "nvchad.mappings"
|
||||||
|
require "td_mappings"
|
||||||
|
|
||||||
-- add yours here
|
-- add yours here
|
||||||
|
|
||||||
@ -69,10 +70,8 @@ end, { desc = "Format buffer / selection" })
|
|||||||
vim.keymap.del({ "n", "t" }, "<A-h>")
|
vim.keymap.del({ "n", "t" }, "<A-h>")
|
||||||
vim.keymap.del({ "n", "t" }, "<A-v>")
|
vim.keymap.del({ "n", "t" }, "<A-v>")
|
||||||
|
|
||||||
|
|
||||||
-- Vault-wide find-and-replace with confirmation popup
|
-- Vault-wide find-and-replace with confirmation popup
|
||||||
vim.keymap.set("n", "<leader>rn", function()
|
vim.keymap.set("n", "<leader>rn", function()
|
||||||
require("rename_term").run()
|
require("rename_term").run()
|
||||||
end, { desc = "Rename term across vault (find → replace)" })
|
end, { desc = "Rename term across vault (find → replace)" })
|
||||||
|
|
||||||
-- td: time-track markdown todos — all in ~/setup_env/dotfiles/nvim/{td,td_mappings}.lua
|
|
||||||
require("td_mappings")
|
|
||||||
|
|||||||
@ -68,7 +68,7 @@ return {
|
|||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
preview_config = {
|
preview_config = {
|
||||||
border = "rounded", -- Options: "single", "double", "rounded", "solid", "shadow"
|
border = "rounded",
|
||||||
style = "minimal",
|
style = "minimal",
|
||||||
relative = "cursor",
|
relative = "cursor",
|
||||||
row = 0,
|
row = 0,
|
||||||
@ -113,13 +113,4 @@ return {
|
|||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- {
|
|
||||||
-- "nvim-treesitter/nvim-treesitter",
|
|
||||||
-- opts = {
|
|
||||||
-- ensure_installed = {
|
|
||||||
-- "vim", "lua", "vimdoc",
|
|
||||||
-- "html", "css"
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
-- },
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,6 +20,7 @@ return {
|
|||||||
version = "*",
|
version = "*",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
ft = "markdown",
|
ft = "markdown",
|
||||||
|
cond = #workspaces > 0,
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user