diff --git a/dictionary/markdown-claude.dict b/dictionary/markdown-claude.dict new file mode 100644 index 0000000..889b0b1 --- /dev/null +++ b/dictionary/markdown-claude.dict @@ -0,0 +1,3 @@ +/openspec:proposal +/openspec:apply +/openspec:archive diff --git a/dictionary/markdown.dict b/dictionary/markdown.dict new file mode 100644 index 0000000..1c83cea --- /dev/null +++ b/dictionary/markdown.dict @@ -0,0 +1,2 @@ +Conner +Ohnesorge diff --git a/dictionary/words.dict b/dictionary/words.dict new file mode 100644 index 0000000..038b5dc --- /dev/null +++ b/dictionary/words.dict @@ -0,0 +1 @@ +Ohnesorge diff --git a/lua/plugins/blink-cmp-plugin.lua b/lua/plugins/blink-cmp-plugin.lua index 02a2ca7..e545e91 100644 --- a/lua/plugins/blink-cmp-plugin.lua +++ b/lua/plugins/blink-cmp-plugin.lua @@ -2,7 +2,11 @@ return { "saghen/blink.cmp", version = 'v1.2.0', dependencies = { - { 'echasnovski/mini.nvim', version = false } + { 'echasnovski/mini.nvim', version = false }, + { + 'Kaiser-Yang/blink-cmp-dictionary', + dependencies = { 'nvim-lua/plenary.nvim' } + } }, ---@module 'blink.cmp' ---@type blink.cmp.Config @@ -13,7 +17,7 @@ return { }, }, sources = { - default = { "path", "lsp", "snippets", "buffer", "lazydev" }, + default = { "dictionary", "path", "lsp", "snippets", "buffer", "lazydev" }, providers = { -- dont show LuaLS require statements when lazydev has items @@ -21,6 +25,26 @@ return { fallbacks = { "path", "buffer", "snippets" }, }, lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", fallbacks = { "lsp" } }, + dictionary = { + module = 'blink-cmp-dictionary', + name = 'Dict', + -- Make sure this is at least 2. + -- 3 is recommended + min_keyword_length = 3, + opts = { + dictionary_files = function() + if vim.bo.filetype == 'markdown' then + local bufname = vim.api.nvim_buf_get_name(0) + if bufname:match("^/tmp/claude%-prompt%-.+%.md$") then + return { vim.fn.expand('~/.config/nvim/dictionary/markdown-claude.dict') } + end + return { vim.fn.expand('~/.config/nvim/dictionary/markdown.dict') } + end + return { vim.fn.expand('~/.config/nvim/dictionary/words.dict') } + end, + -- options for blink-cmp-dictionary + } + } }, }, enabled = function() diff --git a/lua/plugins/lspconfig-plugin.lua b/lua/plugins/lspconfig-plugin.lua index bd047ec..168f21f 100644 --- a/lua/plugins/lspconfig-plugin.lua +++ b/lua/plugins/lspconfig-plugin.lua @@ -99,8 +99,8 @@ return { } }, -- elmls = {}, - basedpyright = {}, - -- pyrefly = {}, + -- basedpyright = {}, + pyrefly = {}, protols = { single_file_support = false, cmd = { "protols", "--include-paths=/home/connerohnesorge/Documents/002Orgs/pegwings/pegwings/proto/lib,/home/connerohnesorge/Documents/002Orgs/pegwings/pegwings/proto/src" }, diff --git a/lua/plugins/neotest-plugin.lua b/lua/plugins/neotest-plugin.lua index b792fa1..3a639c0 100644 --- a/lua/plugins/neotest-plugin.lua +++ b/lua/plugins/neotest-plugin.lua @@ -1,49 +1,29 @@ return { "nvim-neotest/neotest", dependencies = { - "nvim-neotest/neotest-go", - -- "lawrence-laz/neotest-zig", + { + "fredrikaverpil/neotest-golang", + version = "*", -- Optional, but recommended; track releases + }, "rouge8/neotest-rust", - -- "arthur944/neotest-bun", - "nvim-neotest/neotest-python", + "antoinemadec/FixCursorHold.nvim", + "nvim-treesitter/nvim-treesitter", + "nvim-lua/plenary.nvim", "nvim-neotest/nvim-nio", - -- 'thenbe/neotest-playwright', }, opts = { log_level = vim.log.levels.TRACE, adapters = { - -- ["neotest-zig"] = { - -- dap = { - -- adapter = "lldb", - -- }, - -- }, - -- ["neotest-playwright"] = { - -- options = { - -- persist_project_selection = true, - -- enable_dynamic_test_discovery = true, - -- }, - -- }, - -- ["neotest-bun"] = { - -- }, ["neotest-rust"] = { dap = { adapter = "lldb", }, }, - ["neotest-python"] = { - dap = { justMyCode = false }, - args = { "--log-level", "DEBUG" }, - runner = "pytest", - is_test_file = function(file_path) - return file_path:match("test_.*%.py") or file_path:match(".*_test%.py") - end, - }, - ["neotest-go"] = { - runner = "go test", - experimental = { - test_table = true, + ["neotest-golang"] = { + runner = "gotestsum", + go_test_args = { + "-v", }, - args = { "-count=1", "-timeout=60s", "-v" } }, }, status = { virtual_text = true }, @@ -97,11 +77,6 @@ return { end require("neotest").setup(opts) - - vim.api.nvim_set_keymap("n", "td", ":lua require('neotest').run.run({strategy = 'dap'})", { - noremap = true, - silent = true - }) end, keys = { { @@ -109,11 +84,6 @@ return { function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" }, - { - "tT", - function() require("neotest").run.run(vim.loop.cwd()) end, - desc = "Run All Test Files" - }, { "tr", function() require("neotest").run.run() end, diff --git a/lua/plugins/obsidian-plugin.lua b/lua/plugins/obsidian-plugin.lua index a7f01be..00e76d3 100644 --- a/lua/plugins/obsidian-plugin.lua +++ b/lua/plugins/obsidian-plugin.lua @@ -48,42 +48,42 @@ return { }, ---@return table - note_frontmatter_func = function(note) - -- Add the title of the note as an alias. - if note.title then - note:add_alias(note.title) - end - - - local out = { id = note.id, aliases = note.aliases, tags = note.tags } - - -- `note.metadata` contains any manually added fields in the frontmatter. - -- So here we just make sure those fields are kept in the frontmatter. - if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then - for k, v in pairs(note.metadata) do - out[k] = v - end - end - - -- Add the created date of the note as an alias if not already present. - if not out.created_at then - out.created_at = getCurrentTimeRFC3339() - end - - -- title is required for the note to be saved. (default: {filename}) - if not out.title then - out.title = note.title - end - - -- description is required for the note to be saved. (default: {filename}) - if not out.description then - out.description = note.title - end - - out.updated_at = getCurrentTimeRFC3339() - - return out - end, + -- note_frontmatter_func = function(note) + -- -- Add the title of the note as an alias. + -- if note.title then + -- note:add_alias(note.title) + -- end + -- + -- + -- local out = { id = note.id, aliases = note.aliases, tags = note.tags } + -- + -- -- `note.metadata` contains any manually added fields in the frontmatter. + -- -- So here we just make sure those fields are kept in the frontmatter. + -- if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then + -- for k, v in pairs(note.metadata) do + -- out[k] = v + -- end + -- end + -- + -- -- Add the created date of the note as an alias if not already present. + -- if not out.created_at then + -- out.created_at = getCurrentTimeRFC3339() + -- end + -- + -- -- title is required for the note to be saved. (default: {filename}) + -- if not out.title then + -- out.title = note.title + -- end + -- + -- -- description is required for the note to be saved. (default: {filename}) + -- if not out.description then + -- out.description = note.title + -- end + -- + -- out.updated_at = getCurrentTimeRFC3339() + -- + -- return out + -- end, }, completion = { -- Set to false to disable completion. diff --git a/lua/plugins/telescope-plugin.lua b/lua/plugins/telescope-plugin.lua index 3418be7..c6e87f3 100644 --- a/lua/plugins/telescope-plugin.lua +++ b/lua/plugins/telescope-plugin.lua @@ -1,6 +1,7 @@ return { 'nvim-telescope/telescope.nvim', - branch = '0.1.x', + -- tag = '0.1.9', + ref = '84b9ba066d1860f7a586ce9cd732fd6c4f77d1d9', event = 'BufWinEnter', dependencies = { 'nvim-telescope/telescope-media-files.nvim', diff --git a/lua/plugins/tree-sitter-plugin.lua b/lua/plugins/tree-sitter-plugin.lua index 4eaef00..6498d79 100644 --- a/lua/plugins/tree-sitter-plugin.lua +++ b/lua/plugins/tree-sitter-plugin.lua @@ -1,11 +1,13 @@ return { "nvim-treesitter/nvim-treesitter", version = false, + branch = "main", build = ":TSUpdate", event = { "BufReadPost", "BufNewFile" }, dependencies = { { "nvim-treesitter/nvim-treesitter-textobjects", + branch = "main", init = function() -- disable rtp plugin, as we only need its queries for mini.ai -- In case other textobject modules are enabled, we will load them @@ -14,35 +16,35 @@ return { vim.g.load_textobjects = true end, }, - { - "nvim-treesitter/nvim-treesitter-context", - config = function() - require("treesitter-context").setup { - -- Enable this plugin (Can be enabled/disabled later via commands) - enable = true, - -- Enable multiwindow support. - multiwindow = false, - -- How many lines the window should span. Values <= 0 mean no limit. - max_lines = 8, - -- Minimum editor window height to enable context. Values <= 0 mean no limit. - min_window_height = 0, - line_numbers = true, - -- Maximum number of lines to show for a single context - multiline_threshold = 20, - -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' - trim_scope = 'outer', - mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline' - -- Separator between context and content. Should be a single character string, like '-'. - -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. - separator = nil, - -- The Z-index of the context window - zindex = 20, - -- (fun(buf: integer): boolean) return false to disable attaching - on_attach = nil, - } - end, - }, - { 'nvim-treesitter/playground' } + -- { + -- "nvim-treesitter/nvim-treesitter-context", + -- config = function() + -- require("treesitter-context").setup { + -- -- Enable this plugin (Can be enabled/disabled later via commands) + -- enable = true, + -- -- Enable multiwindow support. + -- multiwindow = false, + -- -- How many lines the window should span. Values <= 0 mean no limit. + -- max_lines = 8, + -- -- Minimum editor window height to enable context. Values <= 0 mean no limit. + -- min_window_height = 0, + -- line_numbers = true, + -- -- Maximum number of lines to show for a single context + -- multiline_threshold = 20, + -- -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' + -- trim_scope = 'outer', + -- mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline' + -- -- Separator between context and content. Should be a single character string, like '-'. + -- -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. + -- separator = nil, + -- -- The Z-index of the context window + -- zindex = 20, + -- -- (fun(buf: integer): boolean) return false to disable attaching + -- on_attach = nil, + -- } + -- end, + -- }, + -- { 'nvim-treesitter/playground' } }, cmd = { "TSUpdateSync" }, keys = { @@ -175,6 +177,6 @@ return { }, config = function(_, opts) ---@diagnostic disable-next-line: missing-fields - require 'nvim-treesitter.configs'.setup(opts) + require 'nvim-treesitter'.setup(opts) end, }