Skip to content

Commit 0ca6203

Browse files
committed
add lsp folder
1 parent fcaef01 commit 0ca6203

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

lsp/phoenix.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
return require('phoenix').lsp()

lua/phoenix/init.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,23 @@ function server.create()
799799
end
800800

801801
return {
802+
lsp = function()
803+
return {
804+
cmd = server.create(),
805+
filetypes = Config.filetypes,
806+
root_dir = function(bufnr, on_dir)
807+
if
808+
vim.bo[bufnr].modifiable
809+
and not vim.list_contains({ 'terminal', 'nofile' }, vim.bo[bufnr].buftype)
810+
then
811+
on_dir(vim.uv.cwd())
812+
end
813+
end,
814+
reuse_client = function()
815+
return true
816+
end,
817+
}
818+
end,
802819
register = function()
803820
vim.api.nvim_create_autocmd('FileType', {
804821
group = vim.api.nvim_create_augroup('Phoenix', { clear = true }),

0 commit comments

Comments
 (0)