summaryrefslogtreecommitdiff
path: root/dot-config/nvim/plugin/lsp.lua
blob: 4b8a66bc1f93306e4ee1acae2f6c2b7d3984dcf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
vim.pack.add({
	"https://github.com/neovim/nvim-lspconfig",
	"https://github.com/mason-org/mason.nvim",
	"https://github.com/stevearc/conform.nvim",
})

require("mason").setup()

vim.lsp.enable({
	"expert", -- elixir
	"lua_ls", -- lua
})

require("conform").setup({
	-- Formatters
	formatters_by_ft = {
		elixir = { "mix" },
		lua = { "stylua" },
	},

	format_on_save = {
		-- I recommend these options. See :help conform.format for details.
		lsp_format = "fallback",
		timeout_ms = 500,
	},
})