summaryrefslogtreecommitdiff
path: root/dot-config/nvim/plugin/lsp.lua
blob: 3cd726bb852722dffd62fdb3c0a113bc1f324b6c (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
27
28
29
30
31
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
	"ruff", --python
	"tinymist", -- typst
})

require("conform").setup({
	-- Formatters
	formatters_by_ft = {
		elixir = { "mix" },
		lua = { "stylua" },
		haskell = { "ormolu" },
		python = { "ruff format" },
		typst = { "typstyle" },
	},

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