debug bufferline due to update

This commit is contained in:
2025-08-20 10:20:04 +02:00
parent fbead62967
commit 5f67b259c6
3 changed files with 56 additions and 55 deletions

View File

@@ -4,14 +4,14 @@ if not ok then
return return
end end
--- Plugin options
local frappe = require("catppuccin.palettes").get_palette("frappe") local frappe = require("catppuccin.palettes").get_palette("frappe")
local opts = { local opts = {
options = { options = {
-- mode = "tabs", -- mode = "tabs",
separator_style = "slant", separator_style = "slant",
}, },
highlights = require("catppuccin.groups.integrations.bufferline").get({ highlights = require("catppuccin.groups.integrations.bufferline").get_theme({
styles = { "italic", "bold" }, styles = { "italic", "bold" },
custom = { custom = {
all = { all = {
@@ -222,7 +222,6 @@ local opts = {
}), }),
} }
--- Load plugin
bufferline.setup(opts) bufferline.setup(opts)
--- Override keymaps --- Override keymaps

View File

@@ -20,16 +20,20 @@ lspconfig.ansiblels.setup({
}) })
mason_tool_installer.setup({ mason_tool_installer.setup({
ensure_installed = { "ansible-lint" }, ensure_installed = {
"ansible-lint",
"prettier",
},
}) })
conform.setup({ conform.setup({
formatters_by_ft = { formatters_by_ft = {
yaml = { "ansible-lint" }, yaml = { "prettier" },
yml = { "prettier" },
}, },
format_on_save = { format_on_save = {
async = false, async = false,
timeout_ms = 500, timeout_ms = 2000,
lsp_format = "fallback", lsp_format = "fallback",
}, },
}) })
@@ -43,6 +47,7 @@ vim.keymap.set({ "n", "v" }, "<leader>lf", function()
end, { desc = "Format" }) end, { desc = "Format" })
lint.linters_by_ft = { lint.linters_by_ft = {
yaml = { "ansible-lint" },
yml = { "ansible-lint" }, yml = { "ansible-lint" },
} }

View File

@@ -1,59 +1,56 @@
local ok, lspconfig, conform, lint = pcall(function() local ok, lspconfig, conform, lint = pcall(function()
return return require("lspconfig"), require("conform"), require("lint")
require("lspconfig"),
require("conform"),
require("lint")
end) end)
if not ok then if not ok then
return return
end end
lspconfig.nixd.setup({ lspconfig.nixd.setup({
-- capabilities = cmp_nvim_lsp.default_capabilities() -- capabilities = cmp_nvim_lsp.default_capabilities()
capabilities = require("config/lsp/lsp-capabilities"), capabilities = require("config/lsp/lsp-capabilities"),
on_attach = require("config/lsp/lsp-attach"), on_attach = require("config/lsp/lsp-attach"),
settings = { settings = {
nixd = { nixd = {
nixpkgs = { nixpkgs = {
expr = "import <nixpkgs> { }", expr = "import <nixpkgs> { }",
}, },
-- formatting = { formatting = {
-- command = { "nixfmt" }, command = { "nixfmt" },
-- }, },
}, },
}, },
}) })
-- conform.setup({ conform.setup({
-- formatters_by_ft = { formatters_by_ft = {
-- nix = { "nixfmt" }, nix = { "nixfmt" },
-- }, },
-- format_on_save = { format_on_save = {
-- async = false, async = false,
-- timeout_ms = 500, timeout_ms = 500,
-- lsp_format = "fallback", lsp_format = "fallback",
-- }, },
-- }) })
--
-- vim.keymap.set({ "n", "v" }, "<leader>lf", function()
-- conform.format({
-- async = false,
-- timeout_ms = 500,
-- lsp_format = "fallback",
-- })
-- end, { desc = "Format" })
-- lint.linters_by_ft = { vim.keymap.set({ "n", "v" }, "<leader>lf", function()
-- lua = { "luacheck" }, conform.format({
-- } async = false,
-- timeout_ms = 500,
-- vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, { lsp_format = "fallback",
-- callback = function() })
-- lint.try_lint() end, { desc = "Format" })
-- end,
-- }) lint.linters_by_ft = {
-- lua = { "luacheck" },
-- vim.keymap.set("n", "<leader>ll", function() }
-- lint.try_lint()
-- end, { desc = "Lint" }) vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
callback = function()
lint.try_lint()
end,
})
vim.keymap.set("n", "<leader>ll", function()
lint.try_lint()
end, { desc = "Lint" })