Update 2024-06-13

This commit is contained in:
Kristofers Solo
2024-06-13 17:58:51 +03:00
parent fa1adf8188
commit ac77ae7902
22 changed files with 201 additions and 221 deletions

View File

@@ -3,15 +3,15 @@ return {
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {
style = "night",
transparent = true,
styles = {
keywords = { italic = false },
sidebars = "transparent",
floats = "transparent",
},
lualine_bold = true,
opts = {
style = "night",
transparent = true,
styles = {
keywords = { italic = false },
sidebars = "transparent",
floats = "transparent",
},
lualine_bold = true,
},
config = function()
require("tokyonight").setup({
@@ -37,4 +37,5 @@ return {
{ "ellisonleao/gruvbox.nvim" },
{ "bluz71/vim-nightfly-colors", name = "nightfly" },
{ "rose-pine/neovim" },
{ "slugbyte/lackluster.nvim" },
}

View File

@@ -17,19 +17,18 @@ return {
lua = { "stylua" },
python = { "auto_optional", "ruff", "ruff_fix", "ruff_organize_imports" },
go = { "goimports", "gofmt" },
-- toml = { "taplo" },
javascript = js,
javascriptreact = js,
typescript = js,
typescriptreact = js,
markdown = { "cbfmt", "markdownlint" },
vimwiki = { "cbfmt", "markdownlint" },
markdown = { "cbfmt", "markdownlint", "markdown-toc" },
vimwiki = { "cbfmt", "markdownlint", "markdown-toc" },
c = { "clang-format" },
cpp = { "clang-format" },
cmake = { "cmake_format" },
htmldjango = { "djlint", "rustywind" },
html = { "djlint", "rustywind" },
typst = { "typstyle" },
-- typst = { "typstyle", "typstfmt" },
rust = { "rustfmt", "leptosfmt", "yew-fmt" },
sql = { "pg_format" },
yaml = { "yamlfmt" },

34
lua/plugins/decisive.lua Normal file
View File

@@ -0,0 +1,34 @@
return {
"emmanueltouzery/decisive.nvim",
keys = {
{
"<leader>cca",
function()
require("decisive").align_csv({})
end,
desc = "align CSV",
},
{
"<leader>ccA",
function()
require("decisive").align_csv_clear({})
end,
desc = "align CSV clear",
},
{
"[c",
function()
require("decisive").align_csv_prev_col()
end,
desc = "align CSV prev col",
},
{
"]c",
function()
require("decisive").align_csv_next_col()
end,
desc = "align CSV next col",
},
},
opts = {},
}

10
lua/plugins/donut.lua Normal file
View File

@@ -0,0 +1,10 @@
return {
"NStefan002/donut.nvim",
version = "*",
lazy = false,
cms = "Donut",
opts = {
timeout = 300,
sync_donuts = false,
},
}

View File

@@ -2,14 +2,14 @@ return {
"yujinyuz/gitpad.nvim",
keys = {
{
"<leader><leader>p",
"<leader>nn",
function()
require("gitpad").toggle_gitpad() -- or require('gitpad').toggle_gitpad({ title = 'Project notes' })
end,
desc = "gitpad project",
},
{
"<leader><leader>b",
"<leader>nb",
function()
require("gitpad").toggle_gitpad_branch() -- or require('gitpad').toggle_gitpad_branch({ title = 'Branch notes' })
end,
@@ -17,7 +17,7 @@ return {
},
-- Daily notes
{
"<leader><leader>d",
"<leader>nd",
function()
local date_filename = "daily-" .. os.date("%Y-%m-%d.md")
require("gitpad").toggle_gitpad({ filename = date_filename }) -- or require('gitpad').toggle_gitpad({ filename = date_filename, title = 'Daily notes' })
@@ -26,7 +26,7 @@ return {
},
-- Per file notes
{
"<leader><leader>f",
"<leader>nf",
function()
local filename = vim.fn.expand("%:p") -- or just use vim.fn.bufname()
if filename == "" then

View File

@@ -1,4 +0,0 @@
return {
"m-demare/hlargs.nvim",
opts = {},
}

View File

@@ -2,6 +2,9 @@ return {
"MysticalDevil/inlay-hints.nvim",
event = "LspAttach",
dependencies = { "neovim/nvim-lspconfig" },
keys = {
{ "<leader>oi", vim.cmd.InlayHintsToggle, desc = "Toggle InlayHints" },
},
opts = {
commands = { enable = true }, -- Enable InlayHints commands, include `InlayHintsToggle`, `InlayHintsEnable` and `InlayHintsDisable`
autocmd = { enable = true }, -- Enable the inlay hints on `LspAttach` event

View File

@@ -65,13 +65,11 @@ return {
nmap("<leader>lk", vim.diagnostic.goto_prev, "Diagnostic Prev")
nmap("]d", function()
local trouble = require("trouble")
trouble.open("workspace_diagnostics")
trouble.next({ skip_groups = true, jump = true })
trouble.next({ mode = "diagnostics", skip_groups = true, jump = true })
end, "LSP: Trouble Next")
nmap("[d", function()
local trouble = require("trouble")
trouble.open("workspace_diagnostics")
trouble.previous({ skip_groups = true, jump = true })
trouble.prev({ mode = "diagnostics", skip_groups = true, jump = true })
end, "Trouble Prev")
vim.keymap.set(
{ "n", "v" },

View File

@@ -1,9 +0,0 @@
return {
"iamcco/markdown-preview.nvim",
ft = { "markdown" },
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && yarn install",
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
}

View File

@@ -15,8 +15,9 @@ return {
config = {
workspaces = {
university = "~/neorg/University",
work = "~/neorg/Work",
},
default_workspace = "university",
default_workspace = "work",
},
},
["core.completion"] = {

21
lua/plugins/peek.lua Normal file
View File

@@ -0,0 +1,21 @@
return {
"toppair/peek.nvim",
event = { "VeryLazy" },
build = "deno task --quiet build:fast",
config = function(_, opts)
require("peek").setup(opts)
vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
end,
opts = {
auto_load = true,
close_on_bdelete = true,
syntax = true,
theme = "dark",
update_on_change = true,
app = "browser",
filetype = { "markdown", "vimwiki" },
throttle_at = 200000,
throttle_time = "auto",
},
}

View File

@@ -1,13 +0,0 @@
return {
"MeanderingProgrammer/py-requirements.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
enable_cmp = true,
file_patterns = { "requirements.txt", "requirements_dev.txt", "requirements-dev.txt" },
float_opts = { border = "rounded" },
filter = {
final_release = false,
yanked = true,
},
},
}

31
lua/plugins/spellwarn.lua Normal file
View File

@@ -0,0 +1,31 @@
return {
"ravibrock/spellwarn.nvim",
event = "VeryLazy",
cms = "Spellwanr",
opts = {
event = { -- event(s) to refresh diagnostics on
"CursorHold",
"InsertLeave",
"TextChanged",
"TextChangedI",
"TextChangedP",
"TextChangedT",
},
ft_config = { -- spellcheck method: "cursor", "iter", or boolean
alpha = false,
help = false,
lazy = false,
lspinfo = false,
mason = false,
},
ft_default = true, -- default option for unspecified filetypes
max_file_size = nil, -- maximum file size to check in lines (nil for no limit)
severity = { -- severity for each spelling error type (false to disable diagnostics for that type)
spellbad = "WARN",
spellcap = "HINT",
spelllocal = "HINT",
spellrare = "INFO",
},
prefix = "possible misspelling(s): ", -- prefix for each diagnostic message
},
}

View File

@@ -132,6 +132,7 @@ return {
},
config = function()
local telescope = require("telescope")
local open_with_trouble = require("trouble.sources.telescope").open
telescope.setup({
defaults = {
@@ -157,10 +158,10 @@ return {
["<C-k>"] = require("telescope.actions").move_selection_previous,
["<C-D>"] = require("telescope.actions").delete_buffer
+ require("telescope.actions").move_to_top,
["<C-t>"] = require("trouble").open_with_trouble,
["<C-t>"] = open_with_trouble,
-- ["<C-Y>"] = require("telescope.actions").remove_selection
},
n = { ["<C-t>"] = require("trouble").open_with_trouble },
n = { ["<C-t>"] = open_with_trouble },
},
},
pickers = {

View File

@@ -1,26 +1,17 @@
return {
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
version = "*",
cmd = "Trouble",
keys = {
{
"<leader>tt",
function()
require("trouble").toggle()
end,
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Toggle trouble",
},
{
"<leader>tw",
function()
require("trouble").toggle("workspace_diagnostics")
end,
desc = "[W]orkspace Diagnostics",
},
{
"<leader>td",
function()
require("trouble").toggle("document_diagnostics")
end,
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "[D]ocument Diagnostics",
},
},
@@ -28,7 +19,6 @@ return {
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
icons = true, -- use devicons for filenames
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

View File

@@ -47,6 +47,8 @@ return {
z = { name = "[Z]en" },
r = { name = "[R]ust" },
w = { name = "Vim[W]iki" },
n = { name = "Gitpad" },
m = { name = "Misc" },
L = {
name = "[L]anguage settings",
c = { "<cmd>setlocal formatoptions-=cro<cr>", "Disable autocomment" },