implemented copilot integration as ghost text and simplified some
keyboard shortcuts
This commit is contained in:
@@ -11,6 +11,8 @@ end
|
||||
local kitty_group = vim.api.nvim_create_augroup("KittyOpacity", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "NONE", ctermbg = "NONE" }),
|
||||
vim.api.nvim_set_hl(0, "NormalNC", { bg = "NONE", ctermbg = "NONE" }),
|
||||
group = kitty_group,
|
||||
callback = function()
|
||||
set_kitty_opacity(nvim_opacity)
|
||||
@@ -24,3 +26,18 @@ vim.api.nvim_create_autocmd("VimLeave", {
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight when yanking (copying) text',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function()
|
||||
vim.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "toggleterm", "NvimTree", "help", "dashboard" },
|
||||
callback = function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -3,6 +3,7 @@ require('lspconfig')
|
||||
local lsp_servers = {
|
||||
'clangd',
|
||||
'pyright',
|
||||
'bashls',
|
||||
'lua_ls',
|
||||
}
|
||||
for _, server in ipairs(lsp_servers) do
|
||||
@@ -24,6 +25,9 @@ for _, server in ipairs(lsp_servers) do
|
||||
},
|
||||
}
|
||||
end
|
||||
if server == 'bashls' then
|
||||
config.filetypes = { 'sh', 'bash', 'zsh' }
|
||||
end
|
||||
|
||||
-- Apply the config and enable
|
||||
vim.lsp.config(server, config)
|
||||
|
||||
@@ -16,6 +16,24 @@ function C.RunCommand(Command)
|
||||
end, 50)
|
||||
return ""
|
||||
end
|
||||
-- Save current layout snapshot
|
||||
-- vim.keymap.set("n", "<leader>ss", function()
|
||||
function C.saveSnapshot()
|
||||
vim.cmd("mksession! " .. vim.fn.stdpath("config") .. "/layout_snap.vim")
|
||||
print("Layout snapshot saved.")
|
||||
end
|
||||
|
||||
-- Restore layout snapshot
|
||||
-- vim.keymap.set("n", "<leader>sr", function()
|
||||
function C.returnSnapshot()
|
||||
local path = vim.fn.stdpath("config") .. "/layout_snap.vim"
|
||||
if vim.fn.filereadable(path) == 1 then
|
||||
vim.cmd("source " .. path)
|
||||
print("Layout snapshot restored.")
|
||||
else
|
||||
print("No layout snapshot found.")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return C
|
||||
|
||||
+42
-27
@@ -12,9 +12,14 @@ vim.cmd('silent! tmapclear') -- Clears Terminal maps
|
||||
package.loaded["custom-functions"] = nil
|
||||
local utils = require("custom-functions")
|
||||
|
||||
-- move betwwen buffer easier
|
||||
-- move betwwen buffers and tabs easier
|
||||
vim.keymap.set('n','<Tab>' ,':bnext<CR>')
|
||||
vim.keymap.set('n','<S-Tab>' ,':bprev<CR>')
|
||||
vim.keymap.set('n','<C-Tab>' ,':tabNext<CR>') --TODO fix these
|
||||
vim.keymap.set('n','<C-S-Tab>' ,':tabprevious<CR>')
|
||||
vim.keymap.set('n','<leader>tx' ,':tabclose<CR>')
|
||||
vim.keymap.set('n','<leader>tn' ,':tabnew<CR>')
|
||||
vim.keymap.set('n','<leader>bx' ,':bdelete<CR>')
|
||||
vim.keymap.set('n','<leader>x' ,':bdelete<CR>')
|
||||
-- resizing pains with resize.lua shortcut
|
||||
vim.keymap.set('n','<M-Left>' ,"<cmd>lua require('resize').ResizeLeft()<CR>")
|
||||
@@ -24,14 +29,35 @@ vim.keymap.set('n','<M-Down>' ,"<cmd>lua require('resize').ResizeDown()<CR>")
|
||||
-- terminal interface shortcuts
|
||||
vim.keymap.set('n','<Esc>' ,'<cmd>nohlsearch<CR>')
|
||||
vim.keymap.set('t','<Esc><Esc>' ,'<C-\\><C-n>' ,{ desc = 'Exit terminal mode' })
|
||||
vim.keymap.set('n','<leader>r' ,'<cmd>TermExec cmd="clear && make"<CR>' ,{ desc = '[r]un make in terminal' })
|
||||
vim.keymap.set('t','<C-h>' ,'<C-\\><C-n><C-w><C-h>' ,{ desc = 'Move focus to the left window' })
|
||||
-- vim.keymap.set('n','<leader>r' ,'<cmd>TermExec cmd="clear && make"<CR>' ,{ desc = '[r]un make in terminal' })
|
||||
vim.keymap.set('n','<leader>l' ,function() utils.RunCommand("l") end ,{ desc = 'run [l]ast command in terminal' })
|
||||
vim.keymap.set('n','<leader>nn' ,'<cmd>ToggleTerm direction=vertical name=compile size=70<CR>', { desc = 'open a [n]ew terminal' })
|
||||
vim.keymap.set('n','<leader>nt' ,'<cmd>ToggleTerm<CR>' ,{desc = '[T]oggle all terminals'})
|
||||
vim.keymap.set('n','<leader>ss' ,function() utils.saveSnapshot() end ,{ desc = '[S]ave a [S]napshot of the current windows' })
|
||||
vim.keymap.set('n','<leader>sr' ,function() utils.returnSnapshot() end ,{ desc = '[R]eturn to saved [S]napshot' })
|
||||
vim.keymap.set('n','<leader>n' ,'<cmd>ToggleTerm direction=vertical name=compile size=70<CR>', { desc = 'open a [n]ew terminal' })
|
||||
vim.keymap.set('n','<leader>te' ,'<cmd>ToggleTerm<CR>' ,{desc = '[T]oggle all terminals'})
|
||||
vim.keymap.set("n","<leader>e" ,"<cmd>NvimTreeToggle<CR>" ,{desc = 'open [E]xplorer'})
|
||||
vim.keymap.set("n","<leader>E" ,"<cmd>e!<CR>" ,{desc = '[E]dit current file from disk'})
|
||||
vim.keymap.set("n","<M-r>" ,"<cmd>e!<CR>" ,{desc = '[E]dit current file from disk'})
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '<leader>q' ,vim.diagnostic.setloclist ,{ desc = 'Open diagnostic [Q]uickfix list' })
|
||||
vim.keymap.set("n", "<leader>R" ,"<cmd>source %<Cr>:echo 'Config reloaded!'<CR>" ,{ desc = "[S]ource config file"})
|
||||
vim.keymap.set("n", "<leader><C-R>k" ,"<cmd>source /home/venus/.config/nvim/lua/keybinds.lua<Cr>:echo 'Config reloaded!'<CR>" ,{ desc = "[R]eload [k]eybinds"})
|
||||
vim.keymap.set("n", "<leader><C-R>c" ,"<cmd>source /home/venus/.config/nvim/lua/autocommands.lua<Cr>:echo 'Config reloaded!'<CR>" ,{ desc = "[R]eload [a]utocommands"})
|
||||
vim.keymap.set("n", "<leader><C-R>o" ,"<cmd>source /home/venus/.config/nvim/lua/options.lua<Cr>:echo 'Config reloaded!'<CR>" ,{ desc = "[R]eload [o]ptions"})
|
||||
-- LSP functions
|
||||
vim.keymap.set('n', 'gd' ,vim.lsp.buf.definition, { desc = "LSP Go to Definition" })
|
||||
vim.keymap.set('n', 'gr' ,'<cmd>Telescope lsp_references<cr>' ,{ desc = "LSP [R]eferences" })
|
||||
vim.keymap.set('n', 'gi' ,'<cmd>Telescope lsp_implementations<cr>' ,{ desc = "LSP [I]mplementations" })
|
||||
vim.keymap.set('n', 'gs' ,'<cmd>Telescope lsp_document_symbols<cr>' ,{ desc = "LSP Document [S]ymbols" })
|
||||
vim.keymap.set('n', 'sk' ,'<cmd>Telescope keymaps<cr>' ,{ desc = "[S]earch [K]eymaps" })
|
||||
vim.keymap.set('n', 'sd' ,'<cmd>Telescope diagnostics<cr>' ,{ desc = "[S]earch [D]iagnostics" })
|
||||
vim.keymap.set('n', 'sw' ,'<cmd>Telescope grep_string<cr>' ,{ desc = "[S]earch current [W]ord" })
|
||||
vim.keymap.set('n', '<leader>ff' ,'<cmd>Telescope find_files<cr>' ,{ desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>fg' ,'<cmd>Telescope live_grep<cr>' ,{ desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>fb' ,'<cmd>Telescope buffers<cr>' ,{ desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh' ,'<cmd>Telescope help_tags<cr>' ,{ desc = 'Telescope help tags' })
|
||||
vim.keymap.set('n', '<leader>tt' ,'<cmd>Telescope<cr>' ,{ desc = 'Open [T]elescope' })
|
||||
|
||||
-- Disable arrow keys in normal mode
|
||||
vim.keymap.set('n','<left>' ,'<cmd>echo "Use h to move!!"<CR>')
|
||||
@@ -52,13 +78,18 @@ vim.keymap.set("n","<C-S-j>" ,"<C-w>J" ,{ desc = "Move window to the lower
|
||||
vim.keymap.set("n","<C-S-k>" ,"<C-w>K" ,{ desc = "Move window to the upper" })
|
||||
|
||||
-- [[ Basic QOL
|
||||
-- vim.keymap.set("n", "<leader>a", ":IncRename ", {desc = 'ren[A]me variable under cursor'})
|
||||
vim.keymap.set("n", "<leader>rn" ,":IncRename " ,{ desc = '[R]e[n]ame variable under cursor'})
|
||||
vim.keymap.set('n', '<leader>I' ,'<cmd>GuessIndent<cr>' ,{ desc = '[G]uess Indent level' })
|
||||
vim.keymap.set("n", "<leader>i" ,"m'gg=G''" ,{ desc = "Re-indent whole file" })
|
||||
vim.keymap.set("n", "<leader>y" ,"m'ggyG''" ,{ desc = "[Y]ank whole file" })
|
||||
vim.keymap.set("n", "<C-A>" ,"m'ggyG''" ,{ desc = "[Y]ank whole file" })
|
||||
vim.keymap.set("n", "<leader>sr" ,[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]] ,{ desc = "[S]earch/[R]eplace word under cursor" })
|
||||
|
||||
-- PLUGIN KEYBINDS
|
||||
vim.keymap.set({ "n", "v" } ,"<leader>aa" ,"<cmd>CodeCompanionActions<cr>" ,{ desc = "CodeCompanion - Actions" })
|
||||
vim.keymap.set({ "n", "v" } ,"<leader>ac" ,"<cmd>CodeCompanionChat Toggle<cr>" ,{ desc = "CodeCompanion - Chat" })
|
||||
vim.keymap.set({ "n", "v" } ,"<leader>ai" ,"<cmd>CodeCompanion<cr>" ,{ desc = "CodeCompanion - Inline" })
|
||||
vim.keymap.set("v" ,"<leader>ad" ,"<cmd>CodeCompanionChat Add<cr>" ,{ desc = "CodeCompanion - Add to Chat" })
|
||||
vim.keymap.set({ "n", "v" } ,"<leader>aa" ,"<cmd>CodeCompanionActions<cr>" ,{ desc = "CodeCompanion - Actions" })
|
||||
vim.keymap.set({ "n", "v" } ,"<leader>ac" ,"<cmd>CodeCompanionChat Toggle<cr>" ,{ desc = "CodeCompanion - Chat" })
|
||||
vim.keymap.set({ "n", "v" } ,"<leader>ai" ,"<cmd>CodeCompanion<cr>" ,{ desc = "CodeCompanion - Inline" })
|
||||
vim.keymap.set("v" ,"<leader>ad" ,"<cmd>CodeCompanionChat Add<cr>" ,{ desc = "CodeCompanion - Add to Chat" })
|
||||
-- Expand 'cc' into 'CodeCompanion' in the command line
|
||||
vim.cmd([[cab cc CodeCompanion]])
|
||||
|
||||
@@ -73,21 +104,5 @@ vim.keymap.set('n', '<leader>hh' ,'<cmd>Hex<CR>' ,{ desc = 'open [H]ex view
|
||||
-- <leader>gg bound to UI toggle
|
||||
vim.keymap.set('n', '<leader>gg' ,'<cmd>Neogit<cr>' ,{ desc = 'open Neo[g]it interface' })
|
||||
vim.keymap.set('n', '<leader>gc' ,'<cmd>Neogit commit<cr>' ,{ desc = 'open Neogit [c]ommit page' })
|
||||
|
||||
|
||||
-- Telecope
|
||||
vim.keymap.set('n', '<leader>ff' ,'<cmd>Telescope find_files<cr>' ,{ desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>fg' ,'<cmd>Telescope live_grep<cr>' ,{ desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>fb' ,'<cmd>Telescope buffers<cr>' ,{ desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh' ,'<cmd>Telescope help_tags<cr>' ,{ desc = 'Telescope help tags' })
|
||||
vim.keymap.set('n', '<leader>t' ,'<cmd>Telescope<cr>' ,{ desc = 'Open [T]elescope' })
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
vim.keymap.set('n', '<leader>gd' ,'<cmd>Neogit diff<cr>' ,{ desc = 'open Neogit [d]iff page' })
|
||||
vim.keymap.set('n', '<leader>gt' ,'<cmd>Neogit tagg<cr>' ,{ desc = 'open Neogit [t]agg page' })
|
||||
|
||||
+16
-16
@@ -3,24 +3,24 @@
|
||||
function M.setup()
|
||||
require('base16-colorscheme').setup {
|
||||
-- Background tones
|
||||
base00 = '#121316', -- Default Background
|
||||
base01 = '#1e2022', -- Lighter Background (status bars)
|
||||
base02 = '#282a2d', -- Selection Background
|
||||
base03 = '#8d9199', -- Comments, Invisibles
|
||||
base00 = '#000000', -- Default Background
|
||||
base01 = '#110d1a', -- Lighter Background (status bars)
|
||||
base02 = '#1a1428', -- Selection Background
|
||||
base03 = '#644c94', -- Comments, Invisibles
|
||||
-- Foreground tones
|
||||
base04 = '#c3c6cf', -- Dark Foreground (status bars)
|
||||
base05 = '#e2e2e6', -- Default Foreground
|
||||
base06 = '#e2e2e6', -- Light Foreground
|
||||
base07 = '#e2e2e6', -- Lightest Foreground
|
||||
base04 = '#b58fff', -- Dark Foreground (status bars)
|
||||
base05 = '#e8d8ff', -- Default Foreground
|
||||
base06 = '#e8d8ff', -- Light Foreground
|
||||
base07 = '#e8d8ff', -- Lightest Foreground
|
||||
-- Accent colors
|
||||
base08 = '#ffb4ab', -- Variables, XML Tags, Errors
|
||||
base09 = '#d7bee4', -- Integers, Constants
|
||||
base0A = '#bbc7db', -- Classes, Search Background
|
||||
base0B = '#9fcaff', -- Strings, Diff Inserted
|
||||
base0C = '#d7bee4', -- Regex, Escape Chars
|
||||
base0D = '#9fcaff', -- Functions, Methods
|
||||
base0E = '#bbc7db', -- Keywords, Storage
|
||||
base0F = '#93000a', -- Deprecated, Embedded Tags
|
||||
base08 = '#ff6f9b', -- Variables, XML Tags, Errors
|
||||
base09 = '#d8b4ff', -- Integers, Constants
|
||||
base0A = '#c79aff', -- Classes, Search Background
|
||||
base0B = '#b58fff', -- Strings, Diff Inserted
|
||||
base0C = '#bd80ff', -- Regex, Escape Chars
|
||||
base0D = '#ab80ff', -- Functions, Methods
|
||||
base0E = '#b880ff', -- Keywords, Storage
|
||||
base0F = '#bc0039', -- Deprecated, Embedded Tags
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ vim.opt.spellcapcheck = ""
|
||||
vim.o.number = true -- Make line numbers default
|
||||
vim.o.relativenumber = true
|
||||
vim.o.showmode = false
|
||||
vim.o.foldmethod = "marker"
|
||||
-- Sync clipboard between OS and Neovim.
|
||||
-- Schedule the setting after `UiEnter` because it can increase startup-time.
|
||||
-- Remove this option if you want your OS clipboard to remain independent.
|
||||
|
||||
@@ -4,7 +4,10 @@ return {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
|
||||
--{{{ Options
|
||||
opts = {
|
||||
--- {{{ Display
|
||||
display = {
|
||||
chat = {
|
||||
window = {
|
||||
@@ -24,17 +27,23 @@ return {
|
||||
}
|
||||
},
|
||||
},
|
||||
-- }}}
|
||||
--
|
||||
-- {{{ INTERACTIONS
|
||||
interactions = {
|
||||
chat = {
|
||||
adapter = "gemini_pro", -- Removed the curly braces
|
||||
adapter = "ollama_coder", -- Removed the curly braces
|
||||
},
|
||||
inline = {
|
||||
adapter = "ollama_coder", -- Removed the curly braces
|
||||
},
|
||||
background = {
|
||||
adapter = "ollama_bg", -- Pointed this to the new extended adapter string
|
||||
}
|
||||
},
|
||||
background = {
|
||||
adapter = "ollama_bg", -- Pointed this to the new extended adapter string
|
||||
},
|
||||
-- }}}
|
||||
--
|
||||
-- {{{ Adapters
|
||||
adapters = {
|
||||
http = {
|
||||
gemini_pro = function()
|
||||
@@ -81,5 +90,40 @@ return {
|
||||
end,
|
||||
},
|
||||
},
|
||||
-- }}}
|
||||
--
|
||||
-- {{{ Library
|
||||
prompt_library = {
|
||||
["Local Executor"] = {
|
||||
strategy = "chat",
|
||||
description = "Executes implementation diffs locally and writes TDD test cases.",
|
||||
opts = {
|
||||
adapter = "ollama_coder", -- Force it to use your local hardware
|
||||
is_default = false,
|
||||
is_slash_cmd = false,
|
||||
},
|
||||
prompts = {
|
||||
{
|
||||
role = "system",
|
||||
content = [[You are the Last Mile Executor.
|
||||
You run in a stateless context. I will provide you with a unified diff and a testing plan.
|
||||
Your strict execution order is:
|
||||
1. Output the test case file modifications first (SDET-first).
|
||||
2. Output the production implementation code modifications.
|
||||
|
||||
Do not write markdown headers (H1/H2). Use code blocks with the language ID.
|
||||
Precede every code block with a line comment specifying the exact 'filepath:'.
|
||||
Do not use bash syntax; adhere strictly to POSIX sh if writing shell automation.
|
||||
Do not execute terminal commands directly. Output the code blocks for manual unstaged review.]],
|
||||
},
|
||||
{
|
||||
role = "user",
|
||||
content = "I am ready to provide the Planner's diff. Await my input.",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- }}}
|
||||
}
|
||||
--}}}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
suggestion = {
|
||||
enabled = false,
|
||||
-- debounce = 150,
|
||||
-- auto_trigger = true,
|
||||
-- keymap = { accept = "M-CR"}
|
||||
},
|
||||
panel = { enabled = false },
|
||||
},
|
||||
},
|
||||
{ "giuxtaposition/blink-cmp-copilot", dependencies = { "zbirenbaum/copilot.lua" } }
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
return {
|
||||
'NMAC427/guess-indent.nvim',
|
||||
config = function()
|
||||
require('guess-indent').setup ({
|
||||
filetype_exclude = {"lua"},
|
||||
})
|
||||
config = function()
|
||||
require('guess-indent').setup {
|
||||
auto_cmd = true, -- Set to false to disable automatic execution
|
||||
filetype_exclude = { 'netrw', 'tutor' }, -- A list of filetypes for which the auto command gets disabled
|
||||
buftype_exclude = { 'help', 'nofile', 'terminal', 'prompt' }, -- A list of buffer types for which the auto command gets disabled
|
||||
}
|
||||
end,
|
||||
} -- Detect tabstop and shiftwidth automatically
|
||||
|
||||
+86
-58
@@ -10,71 +10,99 @@ return { -- adds lsp functionality and api for included languages
|
||||
opts =
|
||||
{
|
||||
keymap = {
|
||||
preset = 'none',
|
||||
['<Down>'] = { 'select_next', 'fallback' },
|
||||
['<Up>'] = { 'select_prev', 'fallback' },
|
||||
['<Tab>'] = { 'accept', 'fallback' },
|
||||
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
||||
preset = 'none',
|
||||
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
||||
['<C-e>'] = { 'hide', 'fallback' },
|
||||
-- Use home-row modifications for navigation
|
||||
['<C-n>'] = { 'select_next', 'fallback' },
|
||||
['<C-p>'] = { 'select_prev', 'fallback' },
|
||||
-- A robust Tab behavior that accepts selections and jumps through snippets
|
||||
['<Tab>'] = {
|
||||
function(cmp)
|
||||
if cmp.is_visible() then return cmp.accept() end
|
||||
if cmp.snippet_active() then return cmp.snippet_forward() end
|
||||
end,
|
||||
'fallback'
|
||||
},
|
||||
['<S-Tab>'] = {
|
||||
function(cmp)
|
||||
if cmp.snippet_active() then return cmp.snippet_backward() end
|
||||
end,
|
||||
'fallback'
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||
-- keymap = {
|
||||
-- preset = 'none',
|
||||
-- ['<Down>'] = { 'select_next', 'fallback' },
|
||||
-- ['<Up>'] = { 'select_prev', 'fallback' },
|
||||
-- ['<Tab>'] = { 'accept', 'fallback' },
|
||||
-- ['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
||||
-- },
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer', 'copilot' },
|
||||
providers = {
|
||||
copilot = { name = 'copilot', module = 'blink-cmp-copilot', score_offset = 100, async = true }
|
||||
},
|
||||
},
|
||||
completion = {
|
||||
ghost_text = { enabled = true },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.nvim' }, -- if you use the mini.nvim suite
|
||||
---@module 'render-markdown'
|
||||
},
|
||||
config = function()
|
||||
local lspconfig = require('lspconfig')
|
||||
-- Since you are using blink.cmp, extract its capabilities
|
||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
},
|
||||
config = function()
|
||||
local lspconfig = require('lspconfig')
|
||||
-- Since you are using blink.cmp, extract its capabilities
|
||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||
|
||||
-- Configure OmniSharp for C# / nanoFramework development
|
||||
lspconfig.omnisharp.setup({
|
||||
capabilities = capabilities,
|
||||
cmd = { "omnisharp" },
|
||||
settings = {
|
||||
FormattingOptions = {
|
||||
EnableEditorConfigSupport = true,
|
||||
-- Configure OmniSharp for C# / nanoFramework development
|
||||
lspconfig.omnisharp.setup({
|
||||
capabilities = capabilities,
|
||||
cmd = { "omnisharp" },
|
||||
settings = {
|
||||
FormattingOptions = {
|
||||
EnableEditorConfigSupport = true,
|
||||
},
|
||||
MsBuild = {
|
||||
LoadProjectsOnDemand = false,
|
||||
},
|
||||
},
|
||||
MsBuild = {
|
||||
LoadProjectsOnDemand = false,
|
||||
},
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
local opts = { buffer = bufnr, remap = false }
|
||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||
vim.keymap.set("n", "<leader>ca", function() vim.lsp.buf.code_action() end, opts)
|
||||
end,
|
||||
})
|
||||
end
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- Only load luvit types when the `vim.uv` word is found
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
-- always load the LazyVim library
|
||||
"LazyVim",
|
||||
-- Only load the lazyvim library when the `LazyVim` global is found
|
||||
{ path = "LazyVim", words = { "LazyVim" } },
|
||||
-- Load the wezterm types when the `wezterm` module is required
|
||||
-- Needs `DrKJeff16/wezterm-types` to be installed
|
||||
{ path = "wezterm-types", mods = { "wezterm" } },
|
||||
-- Load the xmake types when opening file named `xmake.lua`
|
||||
-- Needs `LelouchHe/xmake-luals-addon` to be installed
|
||||
{ path = "xmake-luals-addon/library", files = { "xmake.lua" } },
|
||||
on_attach = function(client, bufnr)
|
||||
local opts = { buffer = bufnr, remap = false }
|
||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||
vim.keymap.set("n", "<leader>ca", function() vim.lsp.buf.code_action() end, opts)
|
||||
end,
|
||||
})
|
||||
end
|
||||
},
|
||||
-- disable when a .luarc.json file is found
|
||||
enabled = function(root_dir)
|
||||
return not vim.uv.fs_stat(root_dir .. "/.luarc.json")
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
ft = "lua", -- only load on lua files
|
||||
opts = {
|
||||
library = {
|
||||
-- Only load luvit types when the `vim.uv` word is found
|
||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||
-- always load the LazyVim library
|
||||
"LazyVim",
|
||||
-- Only load the lazyvim library when the `LazyVim` global is found
|
||||
{ path = "LazyVim", words = { "LazyVim" } },
|
||||
-- Load the wezterm types when the `wezterm` module is required
|
||||
-- Needs `DrKJeff16/wezterm-types` to be installed
|
||||
{ path = "wezterm-types", mods = { "wezterm" } },
|
||||
-- Load the xmake types when opening file named `xmake.lua`
|
||||
-- Needs `LelouchHe/xmake-luals-addon` to be installed
|
||||
{ path = "xmake-luals-addon/library", files = { "xmake.lua" } },
|
||||
},
|
||||
-- disable when a .luarc.json file is found
|
||||
enabled = function(root_dir)
|
||||
return not vim.uv.fs_stat(root_dir .. "/.luarc.json")
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
return {
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"nvim-neotest/nvim-nio",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-neotest/neotest-python",
|
||||
"nvim-neotest/neotest-plenary",
|
||||
"rcarriga/neotest-vim-test",
|
||||
},
|
||||
config = function()
|
||||
local neotest = require("neotest")
|
||||
neotest.setup({
|
||||
adapters = {
|
||||
require("neotest-python")({
|
||||
dap = { justMyCode = false },
|
||||
runner = "pytest",
|
||||
python = ".venv/bin/python"
|
||||
}),
|
||||
require("neotest-plenary"),
|
||||
require("neotest-vim-test")({
|
||||
ignore_file_types = { "python", "vim", "lua" },
|
||||
}),
|
||||
},
|
||||
})
|
||||
vim.keymap.set('n', '<leader>tr' ,function() neotest.run.run() end ,{ desc = 'Neo[T]est [R]un' })
|
||||
vim.keymap.set('n', '<leader>tf' ,function() neotest.run.run(vim.fn.expand("%")) end ,{ desc = 'Neo[T]est Run [F]ile' })
|
||||
vim.keymap.set('n', '<leader>td' ,function() neotest.run.run({ strategy = "dap" }) end ,{ desc = 'Neo[T]est [D]ebug' })
|
||||
vim.keymap.set('n', '<leader>to' ,function() neotest.output_panel.toggle() end ,{ desc = 'Neo[T]est [O]utput Panel' })
|
||||
vim.keymap.set('n', '<leader>ts' ,function() neotest.summary.toggle() end ,{ desc = 'Neo[T]est [S]ummary Sidebar' })
|
||||
vim.keymap.set('n', ']t' ,function() neotest.jump.next({ status = 'failed' }) end,{ desc = 'Next Failed Test' })
|
||||
vim.keymap.set('n', '[t' ,function() neotest.jump.prev({ status = 'failed' }) end,{ desc = 'Prev Failed Test' })
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user