Adjusting COC

This commit is contained in:
2025-09-12 11:46:14 -04:00
parent 1e613cef53
commit bc458aec5a
4 changed files with 23 additions and 8 deletions

View File

@@ -19,6 +19,10 @@
"coc-sh", "coc-sh",
"coc-go" "coc-go"
], ],
"pyright.enable": true,
"python.analysis.autoImportCompletions": true,
"python.analysus.autoSearchPaths": true,
"python.analysis.diagnosticMode": "workspace",
"languageserver": { "languageserver": {
"zig": { "zig": {
"command": "zls", "command": "zls",

View File

@@ -106,13 +106,7 @@ vim.keymap.set("n", "<F1>", ":nohlsearch<CR>", { desc = "Clear Search Highlight"
vim.keymap.set("n", "<F2>", ":UndotreeToggle<CR>", { desc = "Undo Tree Toggle"}) vim.keymap.set("n", "<F2>", ":UndotreeToggle<CR>", { desc = "Undo Tree Toggle"})
vim.keymap.set("n", "<F3>", ":Ranger<CR>", { desc = "Ranger"}) vim.keymap.set("n", "<F3>", ":Ranger<CR>", { desc = "Ranger"})
vim.keymap.set("n", "<c-F3>", ":RangerNewTab<CR>", { desc = "Ranger New Tab"}) vim.keymap.set("n", "<c-F3>", ":RangerNewTab<CR>", { desc = "Ranger New Tab"})
-- vim.keymap.set("n", "<F4>", ":q<CR>", { desc = "Quit"}) vim.keymap.set("n", "<f9>", ":Telescope live_grep<cr>", { desc = "live grep"})
-- vim.keymap.set("n", "<F5>", ":bd<CR>", { desc = "Close Buffer"})
-- vim.keymap.set("n", "<F6>", ":tabnew<CR>", { desc = "New Tab"})
-- vim.keymap.set("n", "<F7>", ":tabclose<CR>", { desc = "Close Tab"})
-- vim.keymap.set("n", "<F8>", ":tabnext<CR>", { desc = "Next Tab"})
vim.keymap.set("n", "<F9>", ":Telescope live_grep<CR>", { desc = "Live Grep"})
-- vim.keymap.set("n", "<F10>", ":b#<CR>", { desc = "Last Buffer"})
vim.keymap.set("n", "<F11>", ":setlocal spell! spelllang=en_us<CR>", { desc = "Toggle Spell Check"}) vim.keymap.set("n", "<F11>", ":setlocal spell! spelllang=en_us<CR>", { desc = "Toggle Spell Check"})
vim.keymap.set("n", "<F12>", ":setlocal wrap!<CR>", { desc = "Toggle Line Wrap"}) vim.keymap.set("n", "<F12>", ":setlocal wrap!<CR>", { desc = "Toggle Line Wrap"})
@@ -136,3 +130,19 @@ vim.api.nvim_create_autocmd("FileType", {
}) })
end, end,
}) })
-- COC Keybindings
function ShowDocumentation()
if CocAction("hasProvier", "hover") then
CocActionAsync("doHover")
else
vim.cmd("h " .. vim.bo.filetype)
end
end
vim.keymap.set( "n", "K", ":call ShowDocumentation()<CR>", { noremap = true, silent = true, desc = "Show Documentation" })
vim.keymap.set( "n", "<leader>l", "", {desc = "LSP" })
vim.keymap.set( "n", "<leader>lc", "", {desc = "Completions" })
vim.keymap.set( "n", "<leader>lch", "<cmd>CocCommand document.toggleInlayHint<cr>", {desc = "Toggle Inline Hints" })
vim.keymap.set( "n", "<leader>lcs", "<cmd>CocOutline<cr>", {desc = "Show Symbol Outline" })
vim.keymap.set( "n", "<leader>lcl", "<cmd>CocCommand document.toggleCodeLens<cr>", {desc = "Show Code Lens" })

View File

@@ -12,7 +12,7 @@ vim.o.wildmode = "longest:full,full"
vim.o.wildoptions = "pum" vim.o.wildoptions = "pum"
vim.g.mapleader = " " vim.g.mapleader = " "
vim.o.termguicolors = true vim.o.termguicolors = true
vim.o.winborder = "shadow" vim.o.winborder = "rounded"
vim.o.clipboard = "unnamedplus" vim.o.clipboard = "unnamedplus"
vim.o.completeopt = "menuone" vim.o.completeopt = "menuone"
-- vim.o.completeopt = "menuone,noinsert,noselect" -- vim.o.completeopt = "menuone,noinsert,noselect"

View File

@@ -19,6 +19,7 @@ vim.pack.add({
{ src = "https://github.com/L3MON4D3/LuaSnip" }, { src = "https://github.com/L3MON4D3/LuaSnip" },
{ src = "https://github.com/neovim/nvim-lspconfig" }, { src = "https://github.com/neovim/nvim-lspconfig" },
{ src = "https://github.com/neoclide/coc.nvim" }, { src = "https://github.com/neoclide/coc.nvim" },
{ src = "https://github.com/fannheyward/coc-pyright" },
-- { src = "https://github.com/hrsh7th/nvim-cmp" }, -- { src = "https://github.com/hrsh7th/nvim-cmp" },
-- { src = "https://github.com/hrsh7th/cmp-nvim-lsp" }, -- { src = "https://github.com/hrsh7th/cmp-nvim-lsp" },
-- { src = "https://github.com/hrsh7th/cmp-buffer" }, -- { src = "https://github.com/hrsh7th/cmp-buffer" },