initial commit

This commit is contained in:
Barrett Ruth 2026-02-07 00:45:47 -05:00
commit 23d4795228
99 changed files with 6691 additions and 0 deletions

View file

@ -0,0 +1,9 @@
return {
on_attach = function(_, bufnr)
require('config.lsp').on_attach(_, bufnr)
local bufname = vim.api.nvim_buf_get_name(bufnr)
if string.match(bufname, '%.env') then
vim.diagnostic.enable(false, { bufnr = bufnr })
end
end,
}

View file

@ -0,0 +1,39 @@
local config = require('config.projects')
local clangd_settings = {
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' },
cmd = {
'clangd',
'--clang-tidy',
'-j=4',
'--background-index',
'--completion-style=bundled',
'--header-insertion=iwyu',
'--header-insertion-decorators=false',
},
capabilities = {
textDocument = {
completion = {
editsNearCursor = true,
},
},
},
}
local project_settings = (config.lsp and config.lsp.clangd)
and config.lsp.clangd
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client and client.name == 'clangd' then
bmap(
{ 'n', 'gh', vim.cmd.ClangdSwitchSourceHeader },
{ buffer = args.buf }
)
end
end,
group = vim.api.nvim_creat_augroup('AClangdKeymap', { clear = true }),
})
return vim.tbl_extend('force', clangd_settings, project_settings or {})

View file

@ -0,0 +1,18 @@
return {
cmd = { 'vscode-css-language-server', '--stdio' },
filetypes = { 'css', 'scss', 'less' },
settings = {
css = {
lint = {
unknownAtRules = 'ignore',
},
},
},
capabilities = {
textDocument = {
completion = {
completionItem = { snippetSupport = true },
},
},
},
}

View file

@ -0,0 +1,30 @@
return {
cmd = { 'emmet-language-server', '--stdio' },
filetypes = {
'astro',
'css',
'eruby',
'html',
'htmlangular',
'htmldjango',
'javascriptreact',
'less',
'pug',
'sass',
'scss',
'svelte',
'templ',
'typescriptreact',
'vue',
},
init_options = {
showSuggestionsAsSnippets = true,
},
capabilities = {
textDocument = {
completion = {
completionItem = { snippetSupport = true },
},
},
},
}

View file

@ -0,0 +1,5 @@
return {
settings = {
format = false,
},
}

View file

@ -0,0 +1,9 @@
return {
capabilities = {
textDocument = {
completion = {
completionItem = { snippetSupport = true },
},
},
},
}

View file

@ -0,0 +1,15 @@
return {
capabilities = {
textDocument = {
completion = {
completionItem = { snippetSupport = true },
},
},
},
settings = {
json = {
schemas = require('schemastore').json.schemas(),
validate = { enable = true },
},
},
}

View file

@ -0,0 +1,19 @@
return {
settings = {
Lua = {
codeLens = { enable = true },
completion = { keywordSnippet = 'Disable' },
diagnostics = { globals = { 'vim' } },
hint = {
enable = true,
arrayIndex = 'Disable',
semicolon = 'Disable',
},
runtime = { version = 'LuaJIT' },
telemetry = { enable = false },
workspace = {
checkThirdParty = false,
},
},
},
}

View file

@ -0,0 +1,5 @@
return {
cmd = { 'mdx-language-server', '--stdio' },
filetypes = { 'mdx' },
root_markers = { 'package.json' },
}

View file

@ -0,0 +1,11 @@
return {
cmd = { 'pytest-language-server' },
filetypes = { 'python' },
root_markers = {
'pyproject.toml',
'setup.py',
'setup.cfg',
'pytest.ini',
'.git',
},
}

View file

@ -0,0 +1,28 @@
return {
standalone = false,
capabilities = { general = { positionEncodings = { 'utf-16' } } },
settings = {
['rust-analyzer'] = {
checkOnSave = {
overrideCommand = {
'cargo',
'clippy',
'--message-format=json',
'--',
'-W',
'clippy::expect_used',
'-W',
'clippy::pedantic',
'-W',
'clippy::unwrap_used',
},
},
},
},
on_attach = function(...)
require('config.lsp').on_attach(...)
bmap({ 'n', '\\Rc', '<cmd>RustLsp codeAction<cr>' })
bmap({ 'n', '\\Rm', '<cmd>RustLsp expandMacro<cr>' })
bmap({ 'n', '\\Ro', '<cmd>RustLsp openCargo<cr>' })
end,
}

View file

@ -0,0 +1,14 @@
return {
filetypes = {
'javascript',
'javascriptreact',
'typescript',
'typescriptreact',
},
root_markers = {
'tailwind.config.js',
'tailwind.config.ts',
'postcss.config.js',
'postcss.config.ts',
},
}

View file

@ -0,0 +1,12 @@
return {
filetypes = { 'typst' },
settings = {
formatterMode = 'typstyle',
semanticTokens = 'disable',
lint = {
enabled = true,
when = 'onType',
-- when = 'onSave'
},
},
}