mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
fix lunarvim first-run issue
This commit is contained in:
parent
95e38b2ee7
commit
be3e1d08d0
1 changed files with 18 additions and 16 deletions
|
@ -4,20 +4,22 @@ vim.opt.whichwrap = ""
|
||||||
|
|
||||||
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pylyzer" })
|
vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pylyzer" })
|
||||||
|
|
||||||
lvim.format_on_save = true
|
-- null-ls is missing on first-run. only do this if null-ls exists
|
||||||
|
if pcall(require, "null-ls") then
|
||||||
local formatters = require "lvim.lsp.null-ls.formatters"
|
lvim.format_on_save = true
|
||||||
formatters.setup {
|
local formatters = require "lvim.lsp.null-ls.formatters"
|
||||||
{ exe = "nixpkgs-fmt", filetypes = { "nix" } },
|
formatters.setup {
|
||||||
{ exe = "black", filetypes = { "python" } },
|
{ exe = "nixpkgs-fmt", filetypes = { "nix" } },
|
||||||
{
|
{ exe = "black", filetypes = { "python" } },
|
||||||
name = "prettier",
|
{
|
||||||
filetypes = {
|
name = "prettier",
|
||||||
"html",
|
filetypes = {
|
||||||
"json",
|
"html",
|
||||||
"js",
|
"json",
|
||||||
"typescript",
|
"js",
|
||||||
"yaml"
|
"typescript",
|
||||||
|
"yaml"
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
}
|
end
|
||||||
|
|
Loading…
Reference in a new issue