Skip to content

Commit

Permalink
feat(nvim): nightly is not compiling on darwin
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Jul 17, 2023
1 parent 968fe7c commit aeaaafb
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 24 deletions.
36 changes: 18 additions & 18 deletions flake.lock

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

13 changes: 10 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
};
};
})
(import neovim-nightly)
];
in
{
Expand All @@ -69,7 +68,11 @@
pkgs = inputs.nixpkgs.legacyPackages.aarch64-darwin;
extraSpecialArgs = { inherit inputs; };
modules = [
({ config, ... }: { config = { nixpkgs.overlays = overlays; }; })
({ config, ... }: {
config = {
nixpkgs.overlays = overlays;
};
})
./modules/darwin-app-activation.nix
./modules/home.nix
./modules/pkgs.nix
Expand Down Expand Up @@ -100,7 +103,11 @@
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs; };
modules = [
({ config, ... }: { config = { nixpkgs.overlays = overlays; }; })
({ config, ... }: {
config = {
nixpkgs.overlays = overlays ++ [ (import neovim-nightly) ];
};
})
./modules/home.nix
./modules/pkgs.nix
./modules/editorconfig.nix
Expand Down
2 changes: 1 addition & 1 deletion modules/neovim/config/lua/user/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local keymaps = require("lsp_keymaps")
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
if client.server_capabilities.inlayHintProvider then
if client.server_capabilities.inlayHintProvider and vim.fn.has("nvim-0.10") then -- doesn't work in neovim 0.9
vim.lsp.inlay_hint(bufnr, true)
end
autocmds.on_attach(client, bufnr)
Expand Down
4 changes: 3 additions & 1 deletion modules/neovim/config/lua/user/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ vim.opt.colorcolumn = "80"
vim.opt.backspace = { "indent", "eol", "start" }
vim.opt.spell = true
vim.opt.spelllang = { "en_us" }
vim.opt.spellfile = vim.uv.os_homedir() .. "/.spell.add"
if vim.uv then -- doesn't work in neovim 0.9
vim.opt.spellfile = vim.uv.os_homedir() .. "/.spell.add"
end
vim.opt.laststatus = 3
vim.opt.cursorline = true
vim.opt.list = false
Expand Down
2 changes: 1 addition & 1 deletion modules/neovim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ let
sha256 = hash;
};
};

in
{
programs.neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
vimdiffAlias = true;
package = pkgs.neovim-nightly;
plugins = with pkgs.vimPlugins; [
# ui
catppuccin-nvim
Expand Down

0 comments on commit aeaaafb

Please sign in to comment.