From b6980f07c5d4a307a47dc709d776af12b39c27f1 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 15 Jun 2023 10:34:28 +0200 Subject: [PATCH] [nvim] Fix path to Stylua --- .luarc.json | 5 +++-- nvim/coc-languages/lua.vim | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.luarc.json b/.luarc.json index 23b9ee2..18eefe7 100644 --- a/.luarc.json +++ b/.luarc.json @@ -1,3 +1,4 @@ { - "workspace.checkThirdParty": false -} \ No newline at end of file + "workspace.checkThirdParty": false, + "workspace.library": ["${3rd}/luassert/library", "${3rd}/luv/library"] +} diff --git a/nvim/coc-languages/lua.vim b/nvim/coc-languages/lua.vim index a102961..c8c8489 100644 --- a/nvim/coc-languages/lua.vim +++ b/nvim/coc-languages/lua.vim @@ -1,4 +1,10 @@ if !has('nvim-0.2.1') | finish | endif call extend(g:dotfiles_coc_extensions, {'coc-stylua': 1}) let g:coc_user_config['coc.preferences.formatOnSaveFiletypes'] = ['lua'] -let g:coc_user_config['stylua.styluaPath'] = "/usr/bin/stylua" + +" We're using Nix here, so point to the right path... +if has('macunix') + let g:coc_user_config['stylua.styluaPath'] = "/etc/profiles/per-user/alyxia/bin/stylua" +else + let g:coc_user_config['stylua.styluaPath'] = "/usr/bin/stylua" +endif