Compare commits

..

4 Commits

Author SHA1 Message Date
fec1c1777d
Update lazy lock 2025-05-30 17:39:55 +02:00
9e546fb9f7
More random cleanup 2025-05-30 17:39:48 +02:00
ffbdae686e
Split mason configs 2025-05-30 17:38:43 +02:00
644edc8b2e
Use schemastore plugin for yamlls 2025-05-30 17:38:17 +02:00
10 changed files with 115 additions and 110 deletions

View File

@ -14,19 +14,18 @@
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
"luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" },
"mason-conform.nvim": { "branch": "main", "commit": "f3b96fa2217fcb1513301eefbe10ea0e765e33eb" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "d24b3f1612e53f9d54d866b16bedab51813f2bf1" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "d3ada78a941ff09d21dd9b4c2ec36f0cf44a4ccb" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "75d60a8f928decd8b38897f80849768b7c540a5b" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"neo-tree.nvim": { "branch": "main", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
"nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" },
"nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" },
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
"nvim-dap": { "branch": "master", "commit": "b0f983507e3702f073bfe1516846e58b56d4e42f" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-lspconfig": { "branch": "master", "commit": "3ea99227e316c5028f57a4d86a1a7fd01dd876d0" },
"nvim-surround": { "branch": "main", "commit": "0e62500b98f4513feaaf7425c135472457ea5b7d" },
"nvim-lspconfig": { "branch": "master", "commit": "b8e7957bde4cbb3cb25a13a62548f7c273b026e9" },
"nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
@ -43,6 +42,5 @@
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "b24b97c538b71b6de0ce9d84e47df27b6ecafd76" },
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
"yaml-companion.nvim": { "branch": "main", "commit": "131b0d67bd2e0f1a02e0daf2f3460482221ce3c0" }
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
}

View File

@ -13,8 +13,6 @@ return {
-- keymap = { preset = "default" },
keymap = {
preset = "default",
-- ["<C-u>"] = {function(cmp) cmp.scroll_documentation_up(4) end},
-- ["<C-d>"] = {function(cmp) cmp.scroll_documentation_down(4) end},
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
["<C-u>"] = { "scroll_documentation_up" },
["<C-d>"] = { "scroll_documentation_down" },

View File

@ -4,9 +4,6 @@ local file = require("symbols.file")
return {
"akinsho/bufferline.nvim",
dependencies = {
"ojroques/nvim-bufdel",
},
config = function()
-- Enable mousemoveevent if possible
vim.o.mousemoveevent = true
@ -34,8 +31,6 @@ return {
show_buffer_icons = false,
show_buffer_close_icons = false,
diagnostics = "nvim_lsp",
-- close_command = "BufDel %d",
-- right_mouse_command = "BufDel %d",
separator_style = "thick",
left_trunc_marker = "",
right_trunc_marker = "",

View File

@ -12,7 +12,7 @@ return {
require("conform").format({ async = true, lsp_fallback = true })
end,
mode = "",
desc = "[F]ormat buffer",
desc = "Format buffer",
},
},
opts = {

View File

@ -1,3 +1,4 @@
-- https://github.com/j-hui/fidget.nvim
return {
"j-hui/fidget.nvim",
opts = {

View File

@ -0,0 +1,8 @@
return {
"mason-org/mason-lspconfig.nvim",
opts = {},
dependencies = {
{ "mason-org/mason.nvim", opts = {} },
"neovim/nvim-lspconfig",
},
}

View File

@ -0,0 +1,86 @@
return {
"WhoIsSethDaniel/mason-tool-installer.nvim",
dependencies = {
"mason-org/mason.nvim",
"mason-org/mason-lspconfig.nvim",
"zapling/mason-conform.nvim",
},
config = function()
local lsp = require("tools.lsp")
-- Convert lsp entries to consistent format
local tools = {}
for _, tool in pairs(lsp) do
if type(tool) == "table" then
local name = tool[1]
local entry = {}
-- Make a copy and strip out name and lsp config
for k, v in pairs(tool) do
if k ~= 1 and k ~= 2 then
entry[k] = v
end
end
tools[name] = entry
else
tools[tool] = {}
end
end
-- Convert formatters to same format and merge on top of the lsps
local formatters_by_ft = require("conform").formatters_by_ft
local mapping = require("mason-conform.mapping")
for _, formatter in pairs(formatters_by_ft) do
if type(formatter) == "table" then
for _, tool in ipairs(formatter) do
local entry = {}
local name = nil
if type(tool) == "table" then
name = mapping.conform_to_package[tool[1]]
-- Make a copy and strip out name
for k, v in pairs(tool) do
if k ~= 1 then
entry[k] = v
end
end
else
name = mapping.conform_to_package[tool]
end
if name ~= nil then
tools[name] = vim.tbl_extend("error", tools[name] or {}, entry)
end
end
end
end
local ensure_installed = vim.iter(tools)
:map(function(name, tool)
if type(tool) == "table" then
if tool.system then
return nil
end
local entry = {
[1] = name,
}
for k, v in pairs(tool) do
entry[k] = v
end
return entry
end
return tool
end)
:totable()
require("mason-tool-installer").setup({
ensure_installed = ensure_installed,
auto_update = true,
debounde_hours = 24,
})
end,
}

View File

@ -1,96 +1,4 @@
return {
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
dependencies = {
{ "mason-org/mason.nvim", opts = {} },
"mason-org/mason-lspconfig.nvim",
"zapling/mason-conform.nvim",
},
config = function()
local lsp = require("tools.lsp")
-- Convert lsp entries to consistent format
local tools = {}
for _, tool in pairs(lsp) do
if type(tool) == "table" then
local name = tool[1]
local entry = {}
-- Make a copy and strip out name and lsp config
for k, v in pairs(tool) do
if k ~= 1 and k ~= 2 then
entry[k] = v
end
end
tools[name] = entry
else
tools[tool] = {}
end
end
-- Convert formatters to same format and merge on top of the lsps
local formatters_by_ft = require("conform").formatters_by_ft
local mapping = require("mason-conform.mapping")
for _, formatter in pairs(formatters_by_ft) do
if type(formatter) == "table" then
for _, tool in ipairs(formatter) do
local entry = {}
local name = nil
if type(tool) == "table" then
name = mapping.conform_to_package[tool[1]]
-- Make a copy and strip out name
for k, v in pairs(tool) do
if k ~= 1 then
entry[k] = v
end
end
else
name = mapping.conform_to_package[tool]
end
if name ~= nil then
tools[name] = vim.tbl_extend("error", tools[name] or {}, entry)
end
end
end
end
local ensure_installed = vim.iter(tools)
:map(function(name, tool)
if type(tool) == "table" then
if tool.system then
return nil
end
local entry = {
[1] = name,
}
for k, v in pairs(tool) do
entry[k] = v
end
return entry
end
return tool
end)
:totable()
require("mason-tool-installer").setup({
ensure_installed = ensure_installed,
auto_update = true,
debounde_hours = 24,
})
end,
},
{
"mason-org/mason-lspconfig.nvim",
opts = {},
dependencies = {
{ "mason-org/mason.nvim", opts = {} },
"neovim/nvim-lspconfig",
},
},
"mason-org/mason.nvim",
opts = {},
}

View File

@ -43,6 +43,7 @@ return {
schemas = {},
})
-- TODO: Set on lsp attach with filetype yaml?
vim.keymap.set(
"n",
"<leader>ss",

View File

@ -9,5 +9,15 @@ return {
},
},
})
end
vim.lsp.config("yamlls", {
settings = {
yaml = {
-- Using the schemastore plugin for schemas.
schemastore = { enable = false, url = "" },
schemas = require("schemastore").yaml.schemas(),
},
},
})
end,
}