Compare commits
5 Commits
795bc171f7
...
92840f428e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92840f428e | ||
|
|
fc5cf565d6 | ||
|
|
5a9c788b08 | ||
|
|
3bb580b542 | ||
|
|
381fd0140c |
@@ -1,24 +1,30 @@
|
|||||||
-- This file needs to have same structure as nvconfig.lua
|
-- This file needs to have same structure as nvconfig.lua
|
||||||
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
|
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
|
||||||
-- Please read that file to know all available options :(
|
-- Please read that file to know all available options :(
|
||||||
|
|
||||||
---@type ChadrcConfig
|
---@type ChadrcConfig
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.base46 = {
|
M.base46 = {
|
||||||
theme = "monekai",
|
theme = "doomchad",
|
||||||
|
transparency = true,
|
||||||
|
|
||||||
-- hl_override = {
|
hl_override = {
|
||||||
-- Comment = { italic = true },
|
Comment = { italic = true },
|
||||||
-- ["@comment"] = { italic = true },
|
["@comment"] = { italic = true },
|
||||||
-- },
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- M.nvdash = { load_on_startup = true }
|
M.nvdash = { load_on_startup = true }
|
||||||
-- M.ui = {
|
M.ui = {
|
||||||
-- tabufline = {
|
tabufline = {
|
||||||
-- lazyload = false
|
lazyload = false,
|
||||||
-- }
|
},
|
||||||
--}
|
telescope = { style = "borderless" },
|
||||||
|
statusline = {
|
||||||
|
theme = "minimal",
|
||||||
|
separator_style = "round",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
-- load defaults i.e lua_lsp
|
-- load defaults i.e lua_lsp
|
||||||
require("nvchad.configs.lspconfig").defaults()
|
local nvlsp = require "nvchad.configs.lspconfig"
|
||||||
|
|
||||||
local lspconfig = require "lspconfig"
|
local lspconfig = require "lspconfig"
|
||||||
|
|
||||||
|
nvlsp.defaults()
|
||||||
|
|
||||||
-- EXAMPLE
|
-- EXAMPLE
|
||||||
local servers = { "html", "cssls", "ruff", "jedi_language_server", "yls", "lua_ls" }
|
local servers = { "html", "cssls", "ruff", "jedi_language_server", "yls", "lua_ls" }
|
||||||
local nvlsp = require "nvchad.configs.lspconfig"
|
|
||||||
|
|
||||||
-- lsps with default config
|
-- lsps with default config
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
|
|||||||
@@ -139,3 +139,75 @@ end, { noremap = true, silent = true, desc = "Explain Selection" }
|
|||||||
-- Expand 'cc' into 'CodeCompanion' in the command line
|
-- Expand 'cc' into 'CodeCompanion' in the command line
|
||||||
vim.cmd([[cab cc CodeCompanion]])
|
vim.cmd([[cab cc CodeCompanion]])
|
||||||
|
|
||||||
|
-- mappings for wiki.vim
|
||||||
|
map("n", "<leader>iw", function ()
|
||||||
|
require("telescope.builtin").live_grep({
|
||||||
|
prompt_title = "Search Wiki",
|
||||||
|
cwd = vim.fn.expand("~/wiki"),
|
||||||
|
})
|
||||||
|
end, { desc = "Search Wiki" })
|
||||||
|
|
||||||
|
map("n", "<leader>jn", "<cmd>WikiJournalNext<cr>", { desc = "Next Journal" })
|
||||||
|
map("n", "<leader>jp", "<cmd>WikiJournalPrev<cr>", { desc = "Previous Journal" })
|
||||||
|
|
||||||
|
|
||||||
|
-- Mappings for Man using ripgrep
|
||||||
|
local actions = require("telescope.actions")
|
||||||
|
local action_state = require("telescope.actions.state")
|
||||||
|
local previewers = require("telescope.previewers")
|
||||||
|
|
||||||
|
-- Define a custom previewer that runs 'man' in a terminal job:
|
||||||
|
local man_previewer = previewers.new_termopen_previewer({
|
||||||
|
get_command = function(entry)
|
||||||
|
-- 'entry.value' will be the man-topic, e.g. "ls"
|
||||||
|
if not entry or not entry.value then
|
||||||
|
return { "echo", "" }
|
||||||
|
end
|
||||||
|
-- The pager string (col -bx | bat -l man -p) must be passed as one argument
|
||||||
|
-- so that 'man' interprets it as a shell command for the pager:
|
||||||
|
return {
|
||||||
|
"man",
|
||||||
|
"-P", "col -bx | bat -l man -p", -- all as a single argument to -P
|
||||||
|
entry.value
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Create a mapping that invokes Telescope with our custom previewer
|
||||||
|
map("n", "<leader>mp", function()
|
||||||
|
require("telescope.builtin").find_files({
|
||||||
|
prompt_title = "Man Pages",
|
||||||
|
find_command = {
|
||||||
|
"bash", "-c",
|
||||||
|
table.concat({
|
||||||
|
-- Pipeline:
|
||||||
|
-- 1) 'rg --files /usr/share/man'
|
||||||
|
-- 2) strip directory paths (xargs basename)
|
||||||
|
-- 3) remove trailing .x or .x.gz (sed)
|
||||||
|
-- 4) sort + unique
|
||||||
|
"rg --files /usr/share/man",
|
||||||
|
"| xargs basename",
|
||||||
|
"| sed 's/\\.[^.]*$//'",
|
||||||
|
"| sort -u",
|
||||||
|
}, " ")
|
||||||
|
},
|
||||||
|
-- Provide our custom previewer
|
||||||
|
previewer = man_previewer,
|
||||||
|
|
||||||
|
-- 3) attach_mappings() lets us override what happens when we press <CR>
|
||||||
|
attach_mappings = function(prompt_bufnr, map_telescope)
|
||||||
|
local function open_man_page()
|
||||||
|
local selection = action_state.get_selected_entry()
|
||||||
|
actions.close(prompt_bufnr)
|
||||||
|
-- Actually open the man page inside Neovim:
|
||||||
|
vim.cmd("Man " .. selection.value)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Bind <CR> in insert + normal mode to open the man page
|
||||||
|
map_telescope("i", "<CR>", open_man_page)
|
||||||
|
map_telescope("n", "<CR>", open_man_page)
|
||||||
|
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end, { desc = "Search manpages" })
|
||||||
|
|||||||
@@ -22,3 +22,13 @@ sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", num
|
|||||||
sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""})
|
sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""})
|
||||||
sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""})
|
sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""})
|
||||||
sign('DapStopped', { text='', texthl='DapStopped', linehl='DapStopped', numhl= 'DapStopped' })
|
sign('DapStopped', { text='', texthl='DapStopped', linehl='DapStopped', numhl= 'DapStopped' })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("QuickFixCmdPost", {
|
||||||
|
callback = function()
|
||||||
|
local qf = vim.fn.getqflist({ size = 0 })
|
||||||
|
if qf.size > 0 then
|
||||||
|
vim.cmd("copen")
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
pattern = "*",
|
||||||
|
})
|
||||||
|
|||||||
@@ -15,6 +15,17 @@ return {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"vim-test/vim-test",
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
vim.g["test#use_quickfix"] = 1
|
||||||
|
vim.g["test#strategy"] = "neovim_sticky"
|
||||||
|
vim.g["test#python#runner"] = "pytest"
|
||||||
|
vim.g["test#python#pytest#executable"] = "uv run pytest"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user