[ADD] lua language config and ad sty config to root dir
This commit is contained in:
@@ -1,11 +1,3 @@
|
||||
-- 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
|
||||
-- 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,
|
||||
})
|
||||
|
||||
@@ -23,6 +23,7 @@ require("lazy").setup({
|
||||
{import = "plugins.langs.ruby"},
|
||||
{import = "plugins.langs.biome"},
|
||||
{ import = "plugins.langs.xml" },
|
||||
{import ="plugins.langs.lua"},
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
|
||||
@@ -12,7 +12,8 @@ return {
|
||||
css = { "biome" },
|
||||
javascript = { "biome" },
|
||||
sql = { "pg_format" },
|
||||
yaml = {"hydra_lsp"}
|
||||
yaml = {"hydra_lsp"},
|
||||
lua = {"stylua"}
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
|
||||
43
lua/plugins/langs/lua/nvim-lspconfig.lua
Normal file
43
lua/plugins/langs/lua/nvim-lspconfig.lua
Normal 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,
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user