Update 2025-04-30

Update 2025-04-04

Update 2025-04-06

Update 2025-04-11

Update 2025-04-13

Update 2025-04-14

Update 2025-04-15

Update 2025-04-25

Update 2025-04-27

Update 2025-04-30
This commit is contained in:
2025-04-16 16:25:22 +03:00
parent f9df29cfaa
commit 0c2ba155d4
17 changed files with 164 additions and 237 deletions

View File

@@ -8,6 +8,7 @@ return {
"nvim-neotest/nvim-nio",
{ "mfussenegger/nvim-dap-python", ft = "python" },
"theHamsta/nvim-dap-virtual-text",
"neovim/nvim-lspconfig",
},
keys = {
{
@@ -192,8 +193,9 @@ return {
dapui.setup()
require("mason-nvim-dap").setup({
automatic_installation = true,
ensure_installed = {
"firefox-debug-adapter",
-- "firefox-debug-adapter",
"codelldb",
},
automatic_install = true,
@@ -205,7 +207,7 @@ return {
require("dap-python").setup("python")
--- JS/TS
local firefox_debug_adapter = mason_registry.get_package("firefox-debug-adapter"):get_install_path()
--[[ local firefox_debug_adapter = mason_registry.get_package("firefox-debug-adapter"):get_install_path()
.. "/dist/adapter.bundle.js"
dap.adapters.firefox = {
type = "executable",
@@ -225,7 +227,7 @@ return {
}
dap.configurations.javascriptreact = dap.configurations.javascript
dap.configurations.typescript = dap.configurations.javascript
dap.configurations.typescriptreact = dap.configurations.javascript
dap.configurations.typescriptreact = dap.configurations.javascript ]]
-- C/C++
dap.adapters.gdb = {

View File

@@ -1,64 +1,25 @@
return {
"3rd/image.nvim",
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
keys = {
{ "<leader>v", vim.cmd.PasteImage, desc = "Paste image from system clipboard" },
},
opts = {
backend = "ueberzug", -- ueberzug, kitty
processor = "magick_rock", -- or "magick_cli"
integrations = {
default = {
dir_path = "assets/img",
extension = "webp",
process_cmd = "convert - -quality 75 webp:-",
file_name = "%Y-%m-%d-%H%M%S",
relative_to_current_file = false,
prompt_for_file_name = false,
},
filetypes = {
markdown = {
enabled = true,
clear_in_insert_mode = false,
download_remote_images = true,
only_render_image_at_cursor = true,
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
template = "![[$FILE_PATH]]",
},
neorg = {
enabled = true,
only_render_image_at_cursor = true,
filetypes = { "norg" },
},
typst = {
enabled = true,
only_render_image_at_cursor = true,
filetypes = { "typst" },
},
html = {
enabled = true,
only_render_image_at_cursor = true,
},
css = {
enabled = true,
only_render_image_at_cursor = true,
vimwiki = {
template = "![[$FILE_PATH]]",
},
},
max_width = nil,
max_height = nil,
max_width_window_percentage = nil,
max_height_window_percentage = 50,
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened
resolve_image_path = function(document_path, image_path, fallback)
-- Define the absolute path to your Assets directory
local assets_dir = vim.fn.expand("~/Obsidian/assets/img/")
-- Check if the image_path is already an absolute path
if image_path:match("^/") then
-- If it's an absolute path, leave it unchanged
return image_path
end
-- Construct the new image path by prepending the Assets directory
local new_image_path = assets_dir .. "/" .. image_path
-- Check if the constructed path exists
if vim.fn.filereadable(new_image_path) == 1 then
return new_image_path
else
-- If the file doesn't exist in Assets, fallback to default behavior
return fallback(document_path, image_path)
end
end,
},
}

View File

@@ -14,7 +14,6 @@ return {
{
"felpafel/inlay-hint.nvim",
event = "LspAttach",
version = "1.0.*",
opts = {
virt_text_pos = "eol",
highlight_group = "comment",

3
lua/plugins/java.lua Normal file
View File

@@ -0,0 +1,3 @@
return {
"nvim-java/nvim-java",
}

View File

@@ -10,6 +10,7 @@ return {
"piersolenski/telescope-import.nvim",
"mrcjkb/rustaceanvim",
"pmizio/typescript-tools.nvim",
"nvim-java/nvim-java",
},
config = function(_, opts)
require("mason").setup()
@@ -48,14 +49,13 @@ return {
nmap("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
nmap("gd", vim.lsp.buf.definition, "[G]oto [D]efinition")
nmap("K", vim.lsp.buf.hover, "Hover Documentation")
nmap("K", function()
vim.lsp.buf.hover({ border = "rounded" })
end, "Hover Documentation")
nmap("gi", vim.lsp.buf.implementation, "[G]oto [I]mplementation")
vim.keymap.set(
"i",
"<C-h>",
vim.lsp.buf.signature_help,
{ buffer = event.buf, desc = "LSP: Signature Documentation" }
)
vim.keymap.set("i", "<C-h>", function()
vim.lsp.buf.signature_help({ border = "rounded" })
end, { buffer = event.buf, desc = "LSP: Signature Documentation" })
nmap("<leader>wa", vim.lsp.buf.add_workspace_folder, "[W]orkspace [A]dd Folder")
nmap("<leader>wr", vim.lsp.buf.remove_workspace_folder, "[W]orkspace [R]emove Folder")
nmap("<leader>ws", vim.lsp.buf.workspace_symbol, "[W]orkspace [S]ymbol")
@@ -65,14 +65,18 @@ return {
end, "[W]orkspace [L]ist Folders")
nmap("<leader>lD", vim.lsp.buf.type_definition, "Type [D]efinition")
nmap("<leader>lr", vim.lsp.buf.rename, "[R]ename")
nmap("<leader>lj", vim.diagnostic.goto_next, "Diagnostic Next")
nmap("<leader>lk", vim.diagnostic.goto_prev, "Diagnostic Prev")
nmap("]d", function()
trouble.next({ mode = "diagnostics", skip_groups = true, jump = true })
end, "LSP: Trouble Next")
nmap("[d", function()
trouble.prev({ mode = "diagnostics", skip_groups = true, jump = true })
end, "Trouble Prev")
nmap("<leader>lj", function()
vim.diagnostic.jump({ count = 1, float = true })
end, "Diagnostic Next")
nmap("<leader>lk", function()
vim.diagnostic.jump({ count = -1, float = true })
end, "Diagnostic Prev")
-- nmap("]d", function()
-- trouble.next({ mode = "diagnostics", skip_groups = true, jump = true })
-- end, "LSP: Trouble Next")
-- nmap("[d", function()
-- trouble.prev({ mode = "diagnostics", skip_groups = true, jump = true })
-- end, "Trouble Prev")
vim.keymap.set(
{ "n", "v" },
"<leader>la",
@@ -80,26 +84,22 @@ return {
{ buffer = event.buf, desc = "LSP: Code [A]ction" }
)
nmap("gr", function()
require("trouble").toggle("lsp_references")
trouble.toggle("lsp_references")
end, "[G]oto [R]eferences")
nmap("gR", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
end,
})
local signs = {
{ name = "DiagnosticSignError", text = "" },
{ name = "DiagnosticSignWarn", text = "" },
{ name = "DiagnosticSignHint", text = "" },
{ name = "DiagnosticSignInfo", text = "" },
}
for _, sign in ipairs(signs) do
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
end
vim.diagnostic.config({
virtual_text = true, -- virtual text
signs = { active = signs }, -- show signs
virtual_text = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.WARN] = "",
[vim.diagnostic.severity.HINT] = "",
[vim.diagnostic.severity.INFO] = "",
},
},
update_in_insert = true,
underline = true,
severity_sort = true,
@@ -113,14 +113,6 @@ return {
},
})
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
border = "rounded",
})
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
border = "rounded",
})
require("mason-lspconfig").setup({
automatic_installation = true,
automatic_setup = true,
@@ -141,6 +133,9 @@ return {
handlers = {
default_setup,
ts_ls = function() end,
jdtls = function()
require("java").setup({})
end,
},
})
@@ -149,6 +144,19 @@ return {
config.capabilities = extend_capabilities(capabilities)
lspconfig[server].setup(config)
end
local function setup_ghostty_lsp()
-- Only activate ghostty-lsp when editing the ghostty config
if vim.fn.expand("%:p") == vim.fs.normalize("**/ghostty/config") then
vim.lsp.start({
name = "ghostty-lsp",
cmd = { "ghostty-lsp" },
root_dir = vim.fs.normalize("~/.config/ghostty"),
})
end
end
vim.api.nvim_create_autocmd("BufRead", { pattern = "*", callback = setup_ghostty_lsp })
end,
opts = {
@@ -175,7 +183,7 @@ return {
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { "vim", "awesome", "client" },
globals = { "vim", "awesome", "client", "ya" },
},
-- workspace = {
-- Make the server aware of Neovim runtime files
@@ -313,15 +321,15 @@ return {
provideFormatter = false,
},
},
tinymist = {
offset_encoding = "utf-8",
settings = {
formatterMode = "typstyle",
exportPdf = "onSave",
outputPath = "$root/target/$dir/$name",
semanticTokens = "disable",
},
},
-- tinymist = {
-- offset_encoding = "utf-8",
-- settings = {
-- formatterMode = "typstyle",
-- exportPdf = "none",
-- outputPath = "$root/target/$dir/$name",
-- semanticTokens = "disable",
-- },
-- },
matlab_ls = {
indexWorkspace = true,
matlabConnectionTiming = "onStart",
@@ -331,6 +339,7 @@ return {
"octave",
},
},
jdtls = {},
},
},
}

View File

@@ -107,31 +107,9 @@ return {
blocks = true, -- Enable for math blocks
},
},
latex = {
enable = false,
blocks = {
-- ["$$"] = {
-- renderer = "typst.math_blocks",
-- },
},
},
latex = { enable = false },
typst = { enable = false },
html = { enable = false },
checkboxes = {
default = " ",
remove_style = "checkbox",
states = {
{ " ", "/", "X" },
{ "<", ">" },
{ "?", "!", "*" },
{ '"' },
{ "l", "b", "i" },
{ "S", "I" },
{ "p", "c" },
{ "f", "k", "w" },
{ "u", "d" },
},
},
},
config = function(_, opts)
require("markview").setup(opts)

View File

@@ -31,7 +31,7 @@ return {
desc = "Extract the visually selected text into a new note and link to it.",
},
{ "<leader>Ow", vim.cmd.ObsidianWorkspace, desc = "Switch to another workspace." },
{ "<leader>Op", vim.cmd.ObsidianPasteImg, desc = "Paste an image from the clipboard into the note." },
-- { "<leader>Op", vim.cmd.ObsidianPasteImg, desc = "Paste an image from the clipboard into the note." },
{
"<leader>Or",
vim.cmd.ObsidianRename,

View File

@@ -1,5 +1,6 @@
return {
"HiPhish/rainbow-delimiters.nvim",
submodules = false,
opts = {
strategy = {},
query = {},

View File

@@ -1,6 +1,7 @@
return {
"michaelrommel/nvim-silicon",
lazy = true,
main = "nvim-silicon",
cmd = "Silicon",
opts = {
-- the font settings with size and fallback font

View File

@@ -4,9 +4,9 @@ return {
lazy = false,
opts = function()
-- Toggle the profiler
Snacks.toggle.profiler():map("<leader>Pp")
Snacks.toggle.profiler():map("<leader>sp")
-- Toggle the profiler highlights
Snacks.toggle.profiler_highlights():map("<leader>Ph")
Snacks.toggle.profiler_highlights():map("<leader>sh")
return {
animate = { enabled = false },
bigfile = { enabled = true },
@@ -17,7 +17,15 @@ return {
explorer = { enabled = false },
git = { enabled = false },
gitbrowse = { enabled = false },
image = { enabled = false },
image = {
enabled = true,
doc = {
inline = false,
float = true,
},
img_dirs = { "img", "images", "assets", "assets/img", "static", "public", "media", "attachments" },
math = { enabled = false },
},
indent = {
enabled = true,
animate = { enabled = false },
@@ -26,7 +34,7 @@ return {
layout = { enabled = false },
lazygit = { enabled = false },
notifier = { enabled = false },
picker = { enabled = false }, -- TODO: might replace telescope
picker = { enabled = false },
profiler = { enabled = false },
quickfile = { enabled = true, exclude = { "latex" } },
rename = { enabled = true },
@@ -38,7 +46,7 @@ return {
toggle = { enabled = false },
win = { enabled = false },
words = { enabled = true },
zen = { enabled = false },
zen = { enabled = true },
}
end,
keys = {
@@ -64,7 +72,7 @@ return {
desc = "History",
},
{
"<leader>Ps",
"<leader>ss",
function()
Snacks.profiler.scratch()
end,

View File

@@ -6,6 +6,10 @@ return {
"JoosepAlviste/nvim-ts-context-commentstring",
"nvim-treesitter/nvim-treesitter-textobjects",
"kristoferssolo/tree-sitter-bruno",
{
"bezhermoso/tree-sitter-ghostty",
build = "make nvim_install",
},
},
opts = {
-- A list of parser names, or "all" (the five listed parsers should always be installed)

View File

@@ -16,58 +16,5 @@ return {
desc = "[D]ocument Diagnostics",
},
},
opts = {
position = "bottom", -- position of the list can be: bottom, top, left, right
height = 10, -- height of the trouble list when position is top or bottom
width = 50, -- width of the list when position is left or right
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
severity = nil, -- nil (ALL) or vim.diagnostic.severity.ERROR | WARN | INFO | HINT
fold_open = "", -- icon used for open folds
fold_closed = "", -- icon used for closed folds
group = true, -- group results by file
padding = true, -- add an extra new line on top of the list
cycle_results = true, -- cycle item list when reaching beginning or end of list
action_keys = { -- key mappings for actions in the trouble list
-- map to {} to remove a mapping, for example:
-- close = {},
close = "q", -- close the list
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
refresh = "r", -- manually refresh
jump = { "<cr>", "<tab>", "<2-leftmouse>" }, -- jump to the diagnostic or open / close folds
open_split = { "<c-x>" }, -- open buffer in new split
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
open_tab = { "<c-t>" }, -- open buffer in new tab
jump_close = { "o" }, -- jump to the diagnostic and close the list
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
switch_severity = "s", -- switch "diagnostics" severity filter level to HINT / INFO / WARN / ERROR
toggle_preview = "P", -- toggle auto_preview
hover = "K", -- opens a small popup with the full multiline message
preview = "p", -- preview the diagnostic location
open_code_href = "c", -- if present, open a URI with more information about the diagnostic error
close_folds = { "zM", "zm" }, -- close all folds
open_folds = { "zR", "zr" }, -- open all folds
toggle_fold = { "zA", "za" }, -- toggle fold of current file
previous = "k", -- previous item
next = "j", -- next item
help = "?", -- help menu
},
multiline = true, -- render multi-line messages
indent_lines = true, -- add an indent guide below the fold icons
win_config = { border = "single" }, -- window configuration for floating windows. See |nvim_open_win()|.
auto_open = false, -- automatically open the list when you have diagnostics
auto_close = false, -- automatically close the list when you have no diagnostics
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
auto_fold = false, -- automatically fold a file trouble list at creation
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
include_declaration = { "lsp_references", "lsp_implementations", "lsp_definitions" }, -- for the given modes, include the declaration of the current symbol in the results
signs = {
-- icons / text used for a diagnostic
error = "",
warning = "",
hint = "",
information = "",
other = "",
},
use_diagnostic_signs = false, -- enabling this will use the signs defined in your lsp client
},
opts = {},
}

View File

@@ -67,7 +67,7 @@ return {
{ "<leader>LI", "<cmd>setlocal autoindent<cr>", desc = "Enable autoindent" },
{ "<leader>Li", "<cmd>setlocal noautoindent<cr>", desc = "Disable autoindent" },
},
{
--[[ {
"<leader>P",
group = "Templates",
{
@@ -136,7 +136,7 @@ return {
},
},
},
},
}, ]]
},
},
},