Skip to content

Commit

Permalink
ci: update flake.lock + fix lua_ls lints for neovim-nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Aug 15, 2023
1 parent e932e56 commit 4e3eb51
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .luarc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"workspace.checkThirdParty": false
}
53 changes: 35 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@
flake = false;
};

# inputs for tests
# inputs for tests and lints
neodev-nvim = {
url = "github:folke/neodev.nvim";
flake = false;
};

plenary-nvim = {
url = "github:nvim-lua/plenary.nvim";
flake = false;
Expand Down Expand Up @@ -61,6 +66,7 @@
inherit
(inputs)
self
neodev-nvim
plenary-nvim
telescope-nvim
nvim-dap
Expand Down Expand Up @@ -109,6 +115,7 @@
"${pkgs.telescope-plugin}/lua"
"${pkgs.toggleterm-plugin}/lua"
"${pkgs.nvim-dap-plugin}/lua"
"${pkgs.neodev-plugin}/types/nightly"
];
checkThirdParty = false;
ignoreDir = [
Expand Down
2 changes: 1 addition & 1 deletion lua/haskell-tools/hoogle/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function HoogleUtil.hoogle_attach_mappings(buf, map)
map('i', '<C-b>', function()
-- Open in browser
local entry = actions_state.get_selected_entry()
HtUtil.open_browser(vim.fn.fnameescape(entry.url))
HtUtil.open_browser(vim.fn.fnameescape(entry.url) or entry.url)
end)
map('i', '<C-r>', function()
-- Replace word under cursor
Expand Down
4 changes: 2 additions & 2 deletions lua/haskell-tools/project/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ local HtProjectUtil = {}
--- Taken from nvim-lspconfig
local function strip_archive_subpath(path)
-- Matches regex from zip.vim / tar.vim
path = vim.fn.substitute(path, 'zipfile://\\(.\\{-}\\)::[^\\\\].*$', '\\1', '')
path = vim.fn.substitute(path, 'tarfile:\\(.\\{-}\\)::.*$', '\\1', '')
path = vim.fn.substitute(path, 'zipfile://\\(.\\{-}\\)::[^\\\\].*$', '\\1', '') or path
path = vim.fn.substitute(path, 'tarfile:\\(.\\{-}\\)::.*$', '\\1', '') or path
return path
end

Expand Down
7 changes: 7 additions & 0 deletions nix/test-overlay.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
self,
neodev-nvim,
plenary-nvim,
telescope-nvim,
nvim-dap,
Expand All @@ -10,6 +11,11 @@ with final.lib.strings;
with final.stdenv; let
nvim-nightly = final.neovim-nightly;

neodev-plugin = final.pkgs.vimUtils.buildVimPluginFrom2Nix {
name = "neodev.nvim";
src = neodev-nvim;
};

plenary-plugin = final.pkgs.vimUtils.buildVimPluginFrom2Nix {
name = "plenary.nvim";
src = plenary-nvim;
Expand Down Expand Up @@ -145,6 +151,7 @@ in {
inherit
nvim-nightly
plenary-plugin
neodev-plugin
telescope-plugin
nvim-dap-plugin
toggleterm-plugin
Expand Down
2 changes: 1 addition & 1 deletion tests/project_spec.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local Path = require('plenary.path')

local cwd = vim.fn.getcwd()
local cwd = vim.fn.getcwd() or '.'
local cabal_project_root = cwd .. '/tests/fixtures/cabal/multi-package'
local stack_project_root = cwd .. '/tests/fixtures/stack/multi-package'
local invalid_project_path = '/some/invalid/path'
Expand Down

0 comments on commit 4e3eb51

Please sign in to comment.