aboutsummaryrefslogtreecommitdiffstats
path: root/lsp
diff options
context:
space:
mode:
Diffstat (limited to 'lsp')
-rw-r--r--lsp/elmls.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lsp/elmls.lua b/lsp/elmls.lua
index a7f27789..33ff9eb4 100644
--- a/lsp/elmls.lua
+++ b/lsp/elmls.lua
@@ -15,7 +15,7 @@ return {
filetypes = { 'elm' },
root_dir = function(bufnr, on_dir)
local fname = api.nvim_buf_get_name(bufnr)
- local filetype = api.nvim_buf_get_option(0, 'filetype')
+ local filetype = vim.bo[bufnr].filetype
if filetype == 'elm' or (filetype == 'json' and fname:match 'elm%.json$') then
on_dir(vim.fs.root(fname, 'elm.json'))
return