mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
Housekeeping: VSCode, zshrc
NeoVIM: - Housekeeping: Keymap updates to git, Code(TS), whichkey hints added for harpoon, git, DB
This commit is contained in:
@@ -185,8 +185,6 @@
|
||||
"markdownlint.config": {
|
||||
"default": true,
|
||||
"MD007": false,
|
||||
"MD024": false,
|
||||
"MD029": false,
|
||||
"MD030": false,
|
||||
"MD033": false,
|
||||
"MD046": false,
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
-- g+: [G]it Operations
|
||||
-- l+: [L]ist Things
|
||||
-- n+: [N]eoVim Stuff
|
||||
-- q+: DB [Q]ueries
|
||||
-- s+: Grep/[S]earch Things
|
||||
-- t+: [T]est runner stuff
|
||||
-- x+: close/dismiss something
|
||||
|
||||
@@ -9,7 +9,7 @@ return {
|
||||
-- FIX: Open files do NOT get replaced with the changed branch
|
||||
require("telescope").load_extension("git_worktree")
|
||||
|
||||
vim.keymap.set("n", "<leader>glw", "<cmd> lua require('telescope').extensions.git_worktree.git_worktrees()<CR>")
|
||||
vim.keymap.set("n", "<leader>gw", "<cmd> lua require('telescope').extensions.git_worktree.git_worktrees()<CR>")
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -26,7 +26,7 @@ return {
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "┆" },
|
||||
},
|
||||
attach_to_untracker = true,
|
||||
attach_to_untracked = true,
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
@@ -63,6 +63,9 @@ return {
|
||||
map("n", "<leader>gsh", gs.stage_hunk, { desc = "Git: Stage Hunk" })
|
||||
map("n", "<leader>gsu", gs.undo_stage_hunk, { desc = "Git: Undo Stage Hunk" })
|
||||
map("n", "<leader>gsb", gs.stage_buffer, { desc = "Git: Stage Current File" })
|
||||
map("n", "<leader>gb", function()
|
||||
gs.blame_line({ full = true })
|
||||
end, { desc = "Git: Hover blame-line" })
|
||||
|
||||
-- visual mode
|
||||
map("v", "<leader>gsH", function()
|
||||
|
||||
@@ -58,9 +58,6 @@ return {
|
||||
-- Add any additional override configuration in the following tables. They will be passed to the `settings` field of the server config
|
||||
-- If you want to override the default filetypes that your language server will attach to you can define the property 'filetypes' to the map in question.
|
||||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
|
||||
lua_ls = {
|
||||
Lua = {
|
||||
workspace = { checkThirdParty = false },
|
||||
@@ -70,50 +67,9 @@ return {
|
||||
-- diagnostics = { disable = { 'missing-fields' } },
|
||||
},
|
||||
},
|
||||
|
||||
-- Markdown
|
||||
marksman = {},
|
||||
|
||||
awk_ls = {},
|
||||
bashls = {
|
||||
filetypes = { "sh", "bash", "zsh" },
|
||||
},
|
||||
cssls = {},
|
||||
dockerls = {},
|
||||
docker_compose_language_service = {},
|
||||
bashls = { filetypes = { "sh", "bash", "zsh" } },
|
||||
html = { filetypes = { "html", "twig", "hbs" } },
|
||||
jsonls = {},
|
||||
pyright = {},
|
||||
rust_analyzer = {},
|
||||
tsserver = {
|
||||
-- keys = {
|
||||
-- {
|
||||
-- "<leader>co",
|
||||
-- function()
|
||||
-- vim.lsp.buf.code_action({
|
||||
-- apply = true,
|
||||
-- context = {
|
||||
-- only = { "source.organizeImports.ts" },
|
||||
-- diagnostics = {},
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- desc = "Typescript: Organize Imports",
|
||||
-- },
|
||||
-- {
|
||||
-- "<leader>cO",
|
||||
-- function()
|
||||
-- vim.lsp.buf.code_action({
|
||||
-- apply = true,
|
||||
-- context = {
|
||||
-- only = { "source.removeUnused.ts" },
|
||||
-- diagnostics = {},
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
-- desc = "Typescript: Remove Unused Imports",
|
||||
-- },
|
||||
-- },
|
||||
settings = {
|
||||
completions = {
|
||||
completeFunctionCalls = true,
|
||||
@@ -144,6 +100,17 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- https://github.com/joe-re/sql-language-server?tab=readme-ov-file#configuration
|
||||
sqlls = {},
|
||||
marksman = {},
|
||||
awk_ls = {},
|
||||
cssls = {},
|
||||
dockerls = {},
|
||||
docker_compose_language_service = {},
|
||||
jsonls = {},
|
||||
pyright = {},
|
||||
rust_analyzer = {},
|
||||
}
|
||||
|
||||
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
|
||||
@@ -184,6 +151,34 @@ return {
|
||||
end,
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>co",
|
||||
function()
|
||||
vim.lsp.buf.code_action({
|
||||
apply = true,
|
||||
context = {
|
||||
only = { "source.organizeImports.ts" },
|
||||
diagnostics = {},
|
||||
},
|
||||
})
|
||||
end,
|
||||
desc = "Typescript: Organize Imports",
|
||||
},
|
||||
{
|
||||
"<leader>cO",
|
||||
function()
|
||||
vim.lsp.buf.code_action({
|
||||
apply = true,
|
||||
context = {
|
||||
only = { "source.removeUnused.ts" },
|
||||
diagnostics = {},
|
||||
},
|
||||
})
|
||||
end,
|
||||
desc = "Typescript: Remove Unused Imports",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
@@ -206,7 +206,6 @@ return {
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
branch = "0.1.x",
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{
|
||||
|
||||
@@ -155,6 +155,7 @@ return {
|
||||
{ find = ">ed" },
|
||||
{ find = "<ed" },
|
||||
{ find = "The only match" },
|
||||
{ find = "DB:" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -50,9 +50,11 @@ return {
|
||||
["<leader>b"] = { name = "Buffer Operations", _ = "which_key_ignore" },
|
||||
["<leader>d"] = { name = "Diagnostics", _ = "which_key_ignore" },
|
||||
["<leader>f"] = { name = "File Operations", _ = "which_key_ignore" },
|
||||
["<leader>g"] = { name = "Git Operations", _ = "which_key_ignore" },
|
||||
["<leader>g"] = { name = "Git", _ = "which_key_ignore" },
|
||||
["<leader>h"] = { name = "Harpoon", _ = "which_key_ignore" },
|
||||
["<leader>l"] = { name = "List Things", _ = "which_key_ignore" },
|
||||
["<leader>n"] = { name = "NVIM Operations", _ = "which_key_ignore" },
|
||||
["<leader>q"] = { name = "Database Query", _ = "which_key_ignore" },
|
||||
["<leader>s"] = { name = "Search/Grep Things", _ = "which_key_ignore" },
|
||||
["<leader>t"] = { name = "Unit Test Operations", _ = "which_key_ignore" },
|
||||
["<leader>x"] = { name = "Delete/Remove Something", _ = "which_key_ignore" },
|
||||
|
||||
@@ -18,7 +18,6 @@ set autoread " Auto reload file if externally changed
|
||||
set nrformats-=octal " Do not let Ctrl-a + Ctrl-x work on octal format numbers
|
||||
set formatoptions=jcroqlnt " When joining lines with J, delete comment characters
|
||||
set display+=truncate " @@@ is displayed in the 1st column of the last screen line
|
||||
set conceallevel=2 " Hide * markup for bold and italic, but not markers with substitutions
|
||||
set tabpagemax=50 " Max number of tabs
|
||||
set viminfo^=!
|
||||
set viewoptions-=options
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/zsh
|
||||
# I'm not using a separate .zprofile; reuse the .profile instead
|
||||
[[ ! -f "$HOME/.profile" ]] || source "$HOME/.profile"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user