Setting up conform, Adding phpactor lsp
This commit is contained in:
parent
5c8aeff729
commit
0167c8dbb4
@ -16,6 +16,20 @@ return {
|
|||||||
},
|
},
|
||||||
config = function ()
|
config = function ()
|
||||||
require("conform").setup()
|
require("conform").setup()
|
||||||
|
-- Command to run async formatting
|
||||||
|
vim.api.nvim_create_user_command("Format", function(args)
|
||||||
|
local range = nil
|
||||||
|
if args.count ~= -1 then
|
||||||
|
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
|
||||||
|
range = {
|
||||||
|
start = { args.line1, 0 },
|
||||||
|
["end"] = { args.line2, end_line:len() },
|
||||||
|
}
|
||||||
|
end
|
||||||
|
require("conform").format({ async = true, lsp_format = "fallback", range = range })
|
||||||
|
end, { range = true })
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +109,12 @@ return
|
|||||||
rust_analyzer = true,
|
rust_analyzer = true,
|
||||||
jdtls = true,
|
jdtls = true,
|
||||||
pylsp = true,
|
pylsp = true,
|
||||||
|
phpactor = {
|
||||||
|
init_options = {
|
||||||
|
["language_server_phpstan.enabled"] = false,
|
||||||
|
["language_server_psalm.enabled"] = false,
|
||||||
|
}
|
||||||
|
},
|
||||||
clangd = {
|
clangd = {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
root_dir = require('lspconfig').util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"),
|
root_dir = require('lspconfig').util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"),
|
||||||
@ -120,7 +126,7 @@ return
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
tsserver = true,
|
ts_ls = true,
|
||||||
gopls = true,
|
gopls = true,
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -18,13 +18,13 @@
|
|||||||
-- }
|
-- }
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
name="catppuccin",
|
name="catppuccin",
|
||||||
priority=1000,
|
priority=1000,
|
||||||
config = function ()
|
config = function ()
|
||||||
require("catppuccin").setup()
|
require("catppuccin").setup()
|
||||||
vim.cmd.colorscheme = "catppuccin"
|
vim.cmd ('colorscheme catppuccin-mocha')
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user