Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Jan 19, 2025
1 parent a78f974 commit cb9f7ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
10 changes: 1 addition & 9 deletions lua/internal/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,4 @@ au('LspAttach', {
end,
})

au('FileType', {
callback = function()
vim.lsp.start({
name = 'wordpath',
cmd = require('internal.server').create(),
root_dir = vim.uv.cwd(),
})
end,
})
require('internal.server').setup()
16 changes: 15 additions & 1 deletion lua/internal/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local projects = {}

-- Default configuration for Phoenix
local default = {
filetypes = { '*' },
-- Dictionary related settings
dict = {
-- Maximum number of words to store in the dictionary
Expand Down Expand Up @@ -596,4 +597,17 @@ function server.create()
end
end

return server
local function setup()
vim.api.nvim_create_autocmd('FileType', {
pattern = cfg.filetypes,
callback = function()
vim.lsp.start({
name = 'phoenix',
cmd = server.create(),
root_dir = vim.uv.cwd(),
})
end,
})
end

return { setup = setup }

0 comments on commit cb9f7ec

Please sign in to comment.