Merge branch 'master' of gitea.srvlan:blob42/my-nvim-lua

master
blob42 8 months ago
commit 8c26c65db9

@ -1,2 +1,5 @@
let g:abolish_save_file = "/home/spike/.config/nvim/after/plugin/abolish.vim"
Abolish place{ho,h}ler{} placeholder
Abolish improt import
Abolish flase false
Abolish optinoal optional

@ -0,0 +1 @@
{"tag_name":"nightly","target_commitish":"91d8f2ac534a51859c0e3c6562d07c94b27f4478","published_at":"2023-08-21T05:16:03Z"}

@ -99,6 +99,10 @@ M.general = { --{{{
-- Copy all
["<leader>Y"] = { "<cmd> %y+ <CR>", "copy whole file" },
-- toggle undotree
["<leader>U"] = { vim.cmd.UndotreeToggle, "toggle undotree panel" },
-- line numbers
["<BS>N"] = { "<cmd> set nu!<CR><cmd> set rnu!<CR>", "toggle line number" },
@ -627,15 +631,19 @@ M.lspconfig = { --{{{
}
} --}}}
local setup_dap = function()
local mydap = require("spike.dap")
local dap = require("dap")
mydap.setup()
return {dap, mydap}
end
M.dap = { -- {{{
plugin = true,
n = {
["<leader>ds"] = {
function()
local mydap = require("spike.dap")
local dap = require("dap")
mydap.setup()
local dap, mydap = unpack (setup_dap())
require('spike.dap.utils').init_breakpoints()
-- set a breakpoint at current line if there are none in
-- the project
@ -688,6 +696,13 @@ M.dap = { -- {{{
},
["<leader>dt"] = { "<cmd>lua require'dapui'.toggle()<CR>", "[dap] toggle UI" },
},
v = {
["<leader>d"] = { function()
if vim.o.filetype == 'python' then
require('dap-python').debug_selection()
end
end, "dap debug visual selection" },
},
} -- }}}

@ -8,6 +8,12 @@ local M = {}
M.setup = function()
vim.g["codegpt_commands"] = {
["q4"] = {
callback_type = "text_popup",
system_message_template = "You are a {{filetype}} software pair assistant AI. Answer my questions. Think step by step out loud.",
user_message_template = "I have a question about the following {{language}} code: ```{{filetype}} {{text_selection}}``` {{command_args}}"
},
["tests"] = {
language_instructions = {
python = "Use pytest framework."

@ -16,9 +16,9 @@ local config = {
alt = {"TODO!"}, -- a set of other keywords that all map to this FIX keywords
},
LEARN = { color = "hint" },
WIP = { color = "default"},
WIP = { color = "default", alt = {"REFACT"}},
NOTE = { alt = { "TIP", "INFO", "TRICK", "RELEASE"}},
DEBUG = {},
DEBUG = { alt = { "DBG", }, color = "debug" },
REVIEW = { color = "info" }
},
colors = {
@ -26,7 +26,8 @@ local config = {
info = {colors.blue},
default = {colors.nord_blue},
warning = {colors.orange},
error = { colors.pink }
error = { colors.red },
debug = { colors.purple }
},
highlight = {
-- multiline = false,

@ -56,7 +56,7 @@ return {
["nvim-treesitter/nvim-treesitter"] = { -- {{{
-- commit = "4f8b2480", -- pin to latest working commit
-- custom config in chadrc -> custom.configs.treesitter
lock = true,
lock = false,
setup = function()
require("core.lazy_load").on_file_open "nvim-treesitter"
require("core.lazy_load").on_file_open "nvim-treesitter-textobjects"
@ -67,7 +67,7 @@ return {
end,
},
["nvim-treesitter/nvim-treesitter-textobjects"] = {
lock = true,
lock = false,
opt = true,
},
-- ["RRethy/nvim-treesitter-textsubjects"] = {
@ -75,7 +75,7 @@ return {
-- },
["ziontee113/syntax-tree-surfer"] = {
lock = true,
lock = false,
opt = true,
config = function()
require("syntax-tree-surfer").setup()
@ -85,14 +85,14 @@ return {
-- https://git.blob42.xyz/blob42/playground/commit/460fe1b3e3b2971c52c5f02a7dbbb132f1f30584
["nvim-treesitter/playground"] = {
-- ["https://git.blob42.xyz/blob42/playground"] = {
lock = true,
lock = false,
-- opt = true,
cmd = { "TSPlayground*" },
-- commit = "460fe1b3e3b2971c52c5f02a7dbbb132f1f30584",
},
["nvim-treesitter/nvim-treesitter-context"] = {
lock = true,
lock = false,
opt = true,
config = function()
require("custom.plugins.configs.treesitter-context").setup()
@ -280,6 +280,10 @@ return {
-- end
},
["mbbill/undotree"] = {
cmd = {"UndotreeToggle"}
},
-- helper to select icons and fonts
["ziontee113/icon-picker.nvim"] = {
@ -301,7 +305,7 @@ return {
-- dap
["mfussenegger/nvim-dap"] = { -- {{{
["mfussenegger/nvim-dap"] = {
-- lock = true,
module = {"dap"},
setup = function()
@ -317,8 +321,14 @@ return {
after = {"nvim-dap"},
config = function()
-- expand share folder
venv_path = vim.fn.stdpath('data') .. '/mason/packages/debugpy/venv/bin/python'
require('dap-python').setup(venv_path)
local venv_path = vim.fn.stdpath('data') .. '/mason/packages/debugpy/venv/bin/python'
local ok, dappy = pcall(require, 'dap-python')
if not ok then
vim.notify("dap-python not found", vim.log.levels.ERROR)
return
end
dappy.setup(venv_path)
dappy.test_runner = 'pytest'
end,
cond = function()
-- filetype is python
@ -342,7 +352,7 @@ return {
config = function()
require("custom.plugins.configs.dap-virt-text").setup_virt_text()
end
}, -- }}}
},
-- User Interface / UX
["stevearc/dressing.nvim"] = {

@ -106,11 +106,11 @@ return {
end,
LSP_progress = function()
if not rawget(vim, "lsp") then
if not rawget(vim, "lsp") or vim.lsp.status then
return ""
end
local Lsp = vim.lsp.util.get_progress_messages()[1]
local Lsp = vim.lsp.status()[1]
-- hide spammy null-ls progress
if Lsp and Lsp.name:match "null%-ls" then

@ -171,6 +171,24 @@ local options = {
{ name = "copilot", priority = 100, group_index = 2 },
{ name = "path", group_index = 2 },
},
sorting = {
priority_weight = 2,
comparators = {
require("copilot_cmp.comparators").prioritize,
-- Below is the default comparitor list and order for nvim-cmp
cmp.config.compare.offset,
-- cmp.config.compare.scopes, --this is commented in nvim-cmp too
cmp.config.compare.exact,
cmp.config.compare.score,
cmp.config.compare.recently_used,
cmp.config.compare.locality,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
},
}
-- check for any override

@ -29,6 +29,7 @@ M.blankline = function()
-- indentline
Group.new("IndentBlanklineChar", colors.background)
Group.new("IndentBlanklineContextChar", colors.primary)
Group.new("IndentBlanklineContextStart", nil, colors.base02)
end
M.show_blank_tabs = function()
@ -46,12 +47,14 @@ M.setup = function()
Group.new("Error", colors.primary, nil, styles.underline)
Group.new("Visual", colors.background, colors.base0D)
-- search
-- select
-- menus
Group.new("PmenuSel", nil, colors.noir_8 )
Group.new("PmenuSel", nil, colors.noir_6 )
Group.new('LineNr', colors.gray2:light())
Group.new('CursorLineNr', colors.gray3)

@ -26,6 +26,9 @@ return {
-- mypy reveal_type
s("revl", fmt([[reveal_type({})]], {i(1)})),
-- quick print debug
s("dbgp", fmt([[print(f"---\n\n{{{}}}---\n\n")]], {i(0)})),
}, { --autosnippets
-- s("uuid#", f(gen_uuid))
s("ret ", t("return ")),

@ -0,0 +1 @@
{"extensions": {"commit": "7098870"}, "nvim-noirbuddy": {"commit": "d6125a2"}, "nvim-dap": {"commit": "1c63f37"}, "guihua.lua": {"commit": "9a15128"}, "plantuml-syntax": {"commit": "845abb5"}, "telescope-fzf-native.nvim": {"commit": "9bc8237"}, "vim-vimux": {"commit": "a62c16c"}, "Comment.nvim": {"commit": "0236521"}, "vim-surround": {"commit": "3d188ed"}, "nvim-lspconfig": {"commit": "c0de180"}, "playground": {"commit": "2b81a01"}, "CodeGPT.nvim": {"commit": "6e3714e"}, "go.nvim": {"commit": "7e5602d"}, "vim-table-mode": {"commit": "9555a3e"}, "vim-fugitive": {"commit": "b3b838d"}, "vim-dadbod-ui": {"commit": "200aebf"}, "ChatGPT.nvim": {"commit": "2107f70"}, "nvim-dap-virtual-text": {"commit": "ab988db"}, "null-ls.nvim": {"commit": "33b853a"}, "vim-argwrap": {"commit": "feaba6b"}, "base46": {"commit": "be301b2"}, "telescope-vim-bookmarks.nvim": {"commit": "92498cb"}, "which-key.nvim": {"commit": "4acffc9"}, "colorbuddy.nvim": {"commit": "8508c6f"}, "nvim-treesitter-textobjects": {"commit": "5627216"}, "nvim-autopairs": {"commit": "ae5b41c"}, "nvterm": {"commit": "5ae78fb"}, "ccc.nvim": {"commit": "4a0ddaf"}, "cmp_luasnip": {"commit": "1809552"}, "friendly-snippets": {"commit": "bc38057"}, "leap.nvim": {"commit": "5efe985"}, "vim-slumlord": {"commit": "5c34739"}, "live-command.nvim": {"commit": "bc7e094"}, "tabular": {"commit": "339091a"}, "nui.nvim": {"commit": "9e3916e"}, "nvim-libmodal": {"commit": "875636e"}, "vim-bookmarks": {"commit": "9cc5fa7"}, "rust-tools.nvim": {"commit": "0cc8ada"}, "todo-comments.nvim": {"commit": "8febc60"}, "gitsigns.nvim": {"commit": "bae45ef"}, "delaytrain.nvim": {"commit": "eb8d215"}, "indent-blankline.nvim": {"commit": "4541d69"}, "mason-lspconfig.nvim": {"commit": "e86a4c8"}, "dressing.nvim": {"commit": "db716a0"}, "info.vim.git": {"commit": "f5947fd"}, "packer.nvim": {"commit": "1d0cf98"}, "telescope.nvim": {"commit": "dc192fa"}, "lsp_signature.nvim": {"commit": "9616a1a"}, "nvim-cmp": {"commit": "c4e491a"}, "plantuml-previewer.vim": {"commit": "1dd4d0f"}, "mason.nvim": {"commit": "fe9e34a"}, "copilot-cmp": {"commit": "d631b3a"}, "icon-picker.nvim": {"commit": "e6dca18"}, "aerial.nvim": {"commit": "de460a4"}, "ui": {"commit": "a7445f5"}, "cmp-nvim-lsp": {"commit": "44b16d1"}, "LuaSnip": {"commit": "99a94cc"}, "zk-nvim": {"commit": "2755788"}, "restore_view.vim": {"commit": "8b93343"}, "nvim-dap-ui": {"commit": "1e21b3b"}, "neorepl.nvim": {"commit": "bc819bb"}, "nvim-web-devicons": {"commit": "eb8f80f"}, "vim-repeat": {"commit": "24afe92"}, "grapple.nvim": {"commit": "ab274a3"}, "vim-jukit": {"commit": "ae16294"}, "nvim-treesitter": {"commit": "620b60b"}, "overseer.nvim": {"commit": "4f8ea34"}, "venn.nvim": {"commit": "c114563"}, "impatient.nvim": {"commit": "47302af"}, "nvim-projectconfig": {"commit": "05fd348"}, "nvim-colorizer.lua": {"commit": "3e7c1e0"}, "vim-dadbod": {"commit": "7d80bbd"}, "vim-abolish": {"commit": "cb3dcb2"}, "vim-tmux-navigator": {"commit": "cdd66d6"}, "navigator.lua": {"commit": "4ba2c95"}, "undotree": {"commit": "0e11ba7"}, "asyncrun.vim": {"commit": "0f99f96"}, "diffview.nvim": {"commit": "500d8b2"}, "nvim-tree.lua": {"commit": "9e87ee2"}, "fzf-lua": {"commit": "c56c492"}, "syntax-tree-surfer": {"commit": "6571f0f"}, "refactoring.nvim": {"commit": "5359e74"}, "nvim-dap-python": {"commit": "37b4cba"}, "copilot.lua": {"commit": "50ca36f"}, "plenary.nvim": {"commit": "267282a"}, "iron.nvim": {"commit": "7f876ee"}, "tmpl.vim": {"commit": "c6c1d6b"}, "nvim-treesitter-context": {"commit": "14856c9"}, "vim-snippets": {"commit": "76e35f3"}, "vim-lexical": {"commit": "9204fca"}, "neodev.nvim": {"commit": "7e3f718"}, "cmp-path": {"commit": "91ff86c"}, "cmp-buffer": {"commit": "3022dbc"}}

@ -0,0 +1,11 @@
local command = vim.api.nvim_create_user_command
local del_command = vim.api.nvim_del_user_command
command("DapPyMethod", function()
require("dap-python").test_method()
end, {})
command("DapPyClass", function()
require("dap-python").test_class()
end, {})
Loading…
Cancel
Save