[ADD] lua language config and ad sty config to root dir

This commit is contained in:
Daveanand Mannie
2026-01-12 11:36:23 -05:00
parent 301a265080
commit 6720c8c765
5 changed files with 46 additions and 9 deletions

View File

@@ -1,11 +1,3 @@
-- Autocmds are automatically loaded on the VeryLazy event -- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
-- Add any additional autocmds here -- Add any additional autocmds here
vim.api.nvim_create_autocmd("FileType", {
pattern = { "lua" },
callback = function()
vim.bo.tabstop = 2
vim.bo.softtabstop = 2
vim.bo.shiftwidth = 2
end,
})

View File

@@ -23,6 +23,7 @@ require("lazy").setup({
{import = "plugins.langs.ruby"}, {import = "plugins.langs.ruby"},
{import = "plugins.langs.biome"}, {import = "plugins.langs.biome"},
{ import = "plugins.langs.xml" }, { import = "plugins.langs.xml" },
{import ="plugins.langs.lua"},
}, },
defaults = { defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.

View File

@@ -12,7 +12,8 @@ return {
css = { "biome" }, css = { "biome" },
javascript = { "biome" }, javascript = { "biome" },
sql = { "pg_format" }, sql = { "pg_format" },
yaml = {"hydra_lsp"} yaml = {"hydra_lsp"},
lua = {"stylua"}
}, },
}, },
dependencies = { dependencies = {

View File

@@ -0,0 +1,43 @@
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
lua_ls = {
settings = {
Lua = {
runtime = {
version = "LuaJIT",
},
format = {
enable = true,
defaultConfig = {
indent_style = "space",
indent_size = "2",
max_line_length = "88",
},
},
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
vim.env.VIMRUNTIME,
},
checkThirdParty = false,
},
telemetry = {
enable = false,
},
},
},
},
},
setup = {
lua_ls = function()
require("snacks").util.lsp.on({ name = "lua_ls" }, function(_, client)
client.server_capabilities.hoverProvider = true
end)
end,
},
},
}