kitchen sink again :(

This commit is contained in:
2025-05-06 16:51:24 -05:00
parent 3094bf2a39
commit 7c3289fded
51 changed files with 544 additions and 792 deletions

View File

@ -1,11 +1,11 @@
local misc = require('core.misc')
local lsp = require('core.lsp.functions')
local misc = require("core.misc")
local lsp = require("core.lsp.functions")
local map = misc.map
return { 'williamboman/mason-lspconfig.nvim',
return { "williamboman/mason-lspconfig.nvim",
requires = {
'williamboman/mason.nvim',
{ 'neovim/nvim-lspconfig',
"williamboman/mason.nvim",
{ "neovim/nvim-lspconfig",
disable = not vim.fn.has("nvim-0.8.0"),
function()
lsp.setup()
@ -13,15 +13,15 @@ return { 'williamboman/mason-lspconfig.nvim',
},
-- these two update some lsp capabilities and therefore must be run first
-- 'hrsh7th/cmp-nvim-lsp',
-- 'kevinhwang91/nvim-ufo'
-- "hrsh7th/cmp-nvim-lsp",
-- "kevinhwang91/nvim-ufo"
},
function()
local lspconfig = require('lspconfig')
local util = require('lspconfig.util')
local lspconfig = require("lspconfig")
local util = require("lspconfig.util")
-- setup language servers
require('mason-lspconfig').setup {
require("mason-lspconfig").setup {
ensure_installed = {
"lua_ls",
"clangd",
@ -42,9 +42,9 @@ return { 'williamboman/mason-lspconfig.nvim',
-- setup luals
["lua_ls"] = function(server_name)
local root_files = { '.luarc.json', '.luarc.jsonc', '.luacheckrc',
'.stylua.toml', 'stylua.toml', 'selene.toml', 'selene.yml',
'README.md'
local root_files = { ".luarc.json", ".luarc.jsonc", ".luacheckrc",
".stylua.toml", "stylua.toml", "selene.toml", "selene.yml",
"README.md"
}
-- FIXME: luals seems to start up twice and sends back twice the
@ -53,10 +53,10 @@ return { 'williamboman/mason-lspconfig.nvim',
settings = {
Lua = {
diagnostics = {
globals = { "vim", 'mp' }
globals = { "vim", "mp" }
},
runtime = {
version = 'LuaJIT'
version = "LuaJIT"
},
format = {
enable = false
@ -76,7 +76,7 @@ return { 'williamboman/mason-lspconfig.nvim',
return root
end
root = util.root_pattern('lua/')(fname)
root = util.root_pattern("lua/")(fname)
if root then
return root
end
@ -107,7 +107,7 @@ return { 'williamboman/mason-lspconfig.nvim',
usePlaceholders = true,
clangdFileStatus = true,
fallback_flags = {
"-xc" -- makes clangd think we're using c instead of c++
"-xc" -- makes clangd think we"re using c instead of c++
}
}
}