From 8ac07f8e05b8be6e06e070aab8a82dbfc2fc31c7 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Sat, 7 Oct 2023 05:41:20 +0900 Subject: [PATCH] fix: nvim: close file --- dotfiles/neovim/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index 2579b76..7475334 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -464,10 +464,12 @@ lspconfig.lua_ls.setup { -- use sysimage only if it exists local julials_so = os.getenv("HOME") .. "/.julia/environments/nvim-lspconfig/sys-ls.so" local julials_so_option = { "", "" } -if io.open(julials_so) then +local julials_so_file = io.open(julials_so) +if julials_so_file then -- if sysimage doesn't exist, julials_so_file == nil julials_so_option = { "-J", julials_so } + julials_so_file:close() end -- main lspconfig.julials.setup {