1diff --git a/Makefile b/Makefile
2index 4aba75d21e54b4857c8cd0227693e2b7d8f33044..fc3a512c0e0e6ea851d9e46d3254dc02342056fc 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -3,7 +3,7 @@ FENNEL?=fennel
6 SOURCES := $(shell find . -name '*.lua')
7
8 install:
9- rm $(PREFIX)/lua/gabrielgio/*
10+ -rm $(PREFIX)/lua/gabrielgio/*
11 mkdir -p $(PREFIX)/lua/gabrielgio/
12 for name in $(SOURCES); do\
13 install -m644 $${name} $(PREFIX)/$${name}; \
14diff --git a/init.lua b/init.lua
15index 24f40621a298ed9c6157833c6a23cc27c546c4f5..524e0064ce60da7e4506d27268b7680d6aec730a 100644
16--- a/init.lua
17+++ b/init.lua
18@@ -25,7 +25,8 @@ "nvim-telescope/telescope.nvim", -- telescope
19 "nvim-telescope/telescope-file-browser.nvim", -- telescope file browser
20 "TimUntersberger/neogit", -- magit
21 "echasnovski/mini.nvim", -- provides many things
22- "jose-elias-alvarez/null-ls.nvim", -- enriches lsp
23+ "mhartington/formatter.nvim", -- provider formatter
24+ "mfussenegger/nvim-lint", -- general linter
25 "nvim-treesitter/nvim-treesitter-context", -- show context of where it is at the code
26 "mbbill/undotree", -- keep track of undos
27 "simrat39/symbols-outline.nvim", -- symbols tree (lsp aware)
28@@ -34,6 +35,7 @@ "RRethy/vim-illuminate", -- hightlight use of the same word (lsp aware)
29 "sainnhe/edge", -- light theme
30 "ellisonleao/gruvbox.nvim", -- light theme
31 "williamboman/mason.nvim", -- manages many things
32+ "williamboman/mason-lspconfig.nvim", -- glue mason and lspconfig
33 "neovim/nvim-lspconfig", -- lsp support
34 }
35
36diff --git a/lua/gabrielgio/init.lua b/lua/gabrielgio/init.lua
37index 00a5ba3658acc49aa0f9a47fe66af4c6b05de6ca..1cd849a61e54e44f34bb38d298b1d1fe67b835aa 100644
38--- a/lua/gabrielgio/init.lua
39+++ b/lua/gabrielgio/init.lua
40@@ -3,9 +3,9 @@ local now, later = mini_deps.now, mini_deps.later
41
42 now(function() require("gabrielgio.settable") end)
43 now(function() require("gabrielgio.treesitter") end)
44+now(function() require("gabrielgio.lazy") end)
45+now(function() require("gabrielgio.lsp") end)
46
47-later(function() require("gabrielgio.lazy") end)
48-later(function() require("gabrielgio.lsp") end)
49 later(function() require("gabrielgio.mini") end)
50 later(function() require("gabrielgio.go") end)
51 later(function() require("gabrielgio.telescope") end)
52diff --git a/lua/gabrielgio/lazy.lua b/lua/gabrielgio/lazy.lua
53index f5d07f712a3720cb7d57059b2018ae9f6c0712db..50fd3a5ebadf09537b93080ee3e1ff462d9b2a42 100644
54--- a/lua/gabrielgio/lazy.lua
55+++ b/lua/gabrielgio/lazy.lua
56@@ -1,9 +1,34 @@
57 -- this file is an amalgamation of configurations that don't have its own
58 -- config file and will be lazily loaded
59-local neogit = require("neogit")
60-local null_ls = require("null-ls")
61-local mason = require("mason")
62+require('formatter').setup()
63+require("mason").setup()
64+require("mason-lspconfig").setup {
65+ ensure_installed = {
66+ "gopls",
67+ "zls",
68+ "lua_ls",
69+ "rust_analyzer",
70+-- "clangd", not working on alpine
71+ "cssls",
72+ "html",
73+ "emmet_ls",
74+ "pylsp",
75+ "zls",
76+ "tsserver"
77+ },
78+}
79+
80+local lint = require('lint')
81
82-null_ls.setup({sources = {null_ls.builtins.diagnostics.golangci_lint}})
83-neogit.setup()
84-mason.setup()
85+lint.linters_by_ft = {
86+ markdown = {'vale'},
87+ go = {"golangcilint"},
88+ lua = {"luacheck"},
89+}
90+
91+vim.api.nvim_create_autocmd({ "BufWritePost" }, {
92+ callback = function()
93+ lint.try_lint()
94+ end,
95+})
96+