Updated config

This commit is contained in:
2025-08-26 11:46:42 +02:00
parent fcb40a52e9
commit 35d6c20abd
17 changed files with 88 additions and 67 deletions

View File

@@ -57,7 +57,9 @@ return {
local line3 = "" .. version
local line1_width = vim.fn.strdisplaywidth(line1)
---@diagnostic disable-next-line: param-type-not-match
local line2Padded = string.rep(" ", (line1_width - vim.fn.strdisplaywidth(line2)) / 2) .. line2
---@diagnostic disable-next-line: param-type-not-match
local line3Padded = string.rep(" ", (line1_width - vim.fn.strdisplaywidth(line3)) / 2) .. line3
dashboard.section.footer.val = {

View File

@@ -4,9 +4,11 @@ return {
event = { "BufReadPre", "BufNewFile" },
config = function()
local function checkPrettierConfig()
local prettier_config = vim.fn.glob(".prettierrc*", false, 1)
local prettier_config = vim.fn.glob(".prettierrc*", false, true)
if prettier_config[1] == nil then
return false
else
return true
end
end
@@ -40,6 +42,11 @@ return {
local range = nil
if args.count ~= -1 then
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
if end_line == nil then
return
end
range = {
start = { args.line1, 0 },
["end"] = { args.line2, end_line:len() },

View File

@@ -1,3 +1,4 @@
---@diagnostic disable: undefined-field
--- @type LazyPluginSpec
return {
"ThePrimeagen/harpoon",

View File

@@ -3,7 +3,6 @@ return {
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
event = { "BufReadPre", "BufNewFile" },
enabled = false,
config = function()
local blankline = require("ibl")
local hooks = require("ibl.hooks")
@@ -12,38 +11,21 @@ return {
vim.opt.listchars:append("space:⋅")
local highlight = {
"RainbowDelimiterRed",
"RainbowDelimiterYellow",
"RainbowDelimiterBlue",
"RainbowDelimiterOrange",
"RainbowDelimiterGreen",
"RainbowDelimiterViolet",
"RainbowDelimiterCyan",
"CursorColumn",
"Whitespace",
}
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
vim.api.nvim_set_hl(0, "RainbowDelimiterRed", { fg = "#E06C75" })
vim.api.nvim_set_hl(0, "RainbowDelimiterYellow", { fg = "#E5C07B" })
vim.api.nvim_set_hl(0, "RainbowDelimiterBlue", { fg = "#61AFEF" })
vim.api.nvim_set_hl(0, "RainbowDelimiterOrange", { fg = "#D19A66" })
vim.api.nvim_set_hl(0, "RainbowDelimiterGreen", { fg = "#98C379" })
vim.api.nvim_set_hl(0, "RainbowDelimiterViolet", { fg = "#C678DD" })
vim.api.nvim_set_hl(0, "RainbowDelimiterCyan", { fg = "#56B6C2" })
end)
vim.g.rainbow_delimiters = { highlight = highlight }
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
blankline.setup({
indent = {
char = "",
highlight = highlight,
},
scope = {
enabled = true,
enabled = false,
char = "",
highlight = highlight,
show_exact_scope = true,
},
indent = { highlight = highlight, char = "" },
whitespace = {
highlight = highlight,
remove_blankline_trail = false,
},
})
end,
}

View File

@@ -11,15 +11,16 @@ return {
},
event = { "BufReadPre", "BufNewFile" },
config = function()
local blink = require("blink.cmp")
-- local cmp_nvim_lsp = require("cmp_nvim_lsp")
local tserrortranslator = require("ts-error-translator")
local on_attach = require("taken.utils.on_attach")
local get_python_path = require("taken.utils.lsp").get_python_path
-- local cmp_nvim_lsp = require("cmp_nvim_lsp")
-- local capabilities = cmp_nvim_lsp.default_capabilities()
local blink = require("blink.cmp")
local capabilities = blink.get_lsp_capabilities()
local default_capabilities = vim.lsp.protocol.make_client_capabilities()
local capabilities = vim.tbl_deep_extend("force", default_capabilities, blink.get_lsp_capabilities({}, false))
vim.diagnostic.config({
signs = {
@@ -41,41 +42,45 @@ return {
"eslint",
"cspell_ls",
"kulala_ls",
-- "emmylua_ls",
"emmylua_ls",
}
vim.lsp.config("*", {
capabilities = capabilities,
---@diagnostic disable-next-line: assign-type-mismatch
on_attach = on_attach,
})
--- @class LspConfigs
--- @field lsp string
--- @field config vim.lsp.Config
local lsps = {
{
lsp = "lua_ls",
config = {
capabilities = capabilities,
on_attach = on_attach,
settings = {
Lua = {
hint = {
enable = true,
},
runtime = {
version = "LuaJIT",
},
diagnostics = {
globals = { "vim" },
},
completion = {
callSnippet = "Replace",
},
format = {
enable = false,
},
},
},
},
},
-- {
-- lsp = "lua_ls",
-- config = {
-- capabilities = capabilities,
-- on_attach = on_attach,
-- settings = {
-- Lua = {
-- hint = {
-- enable = true,
-- },
-- runtime = {
-- version = "LuaJIT",
-- },
-- diagnostics = {
-- globals = { "vim" },
-- },
-- completion = {
-- callSnippet = "Replace",
-- },
-- format = {
-- enable = false,
-- },
-- },
-- },
-- },
-- },
{
lsp = "pyright",
config = {

View File

@@ -13,6 +13,7 @@ return {
config = function()
local on_attach = require("taken.utils.on_attach")
---@diagnostic disable-next-line: missing-fields, param-type-not-match, missing-parameter
require("tailwind-tools").setup({
server = {
on_attach = on_attach,

View File

@@ -11,6 +11,7 @@ return {
timeout = 2500,
})
---@diagnostic disable-next-line: assign-type-mismatch
vim.notify = notify
end,
}

View File

@@ -1,3 +1,4 @@
---@diagnostic disable: undefined-field
--- @type LazyPluginSpec
return {
"hrsh7th/nvim-cmp",

View File

@@ -20,7 +20,7 @@ return {
Snacks.notifier.show_history()
end, { desc = "Show notification history" })
vim.keymap.set("n", "<leader>oh", function()
snacks.notifier.show_history()
Snacks.notifier.show_history()
end, { desc = "Show notification history" })
end,
}