Skip to content

Commit

Permalink
Update init.lua
Browse files Browse the repository at this point in the history
May solve #56
  • Loading branch information
cannorin authored May 13, 2022
1 parent 6eb5de0 commit 3092ca0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/ionide/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ local function create_manager(config)
local manager = util.server_per_root_dir_manager(function(_root_dir) return make_config(_root_dir) end)
function manager.try_add(bufnr)
bufnr = bufnr or api.nvim_get_current_buf()
if api.nvim_buf_get_option(bufnr, "filetype") == "nofile" then
if api.nvim_buf_get_option(bufnr, 'buftype') == 'nofile' then
return
end
local root_dir = get_root_dir(api.nvim_buf_get_name(bufnr), bufnr)
Expand All @@ -191,7 +191,8 @@ local function create_manager(config)
end
end
function manager.try_add_wrapper(bufnr)
local buftype = api.nvim_buf_get_option(bufnr, "filetype")
bufnr = bufnr or api.nvim_get_current_buf()
local buftype = api.nvim_buf_get_option(bufnr, 'filetype')
if buftype == 'fsharp' then
manager.try_add(bufnr)
return
Expand Down

0 comments on commit 3092ca0

Please sign in to comment.