From 2f41ade799fe787874a6bd38a5efc7b1ad49efab Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 15 Jun 2023 10:12:16 +0200 Subject: [PATCH 1/4] [nvim] Lock treesitter down to the old MacBook --- nvim/plugin/treesitter.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nvim/plugin/treesitter.lua b/nvim/plugin/treesitter.lua index 63cb55c..bcdfe6f 100644 --- a/nvim/plugin/treesitter.lua +++ b/nvim/plugin/treesitter.lua @@ -9,8 +9,17 @@ if not ok then return end -- So, the nix-darwin configuration specifies the installation of zig as a -- replacement compiler solely so the Treesitter dialects compile. Very -- intuitive. +-- Sadly, the solution only works on my old MacBook pro, which is a 13 inch +-- model. So my only option is to lock it down to that device. if vim.loop.os_uname().sysname == 'Darwin' then - require('nvim-treesitter.install').compilers = { "zig" } + local meta = vim.fn.system({"system_profiler", "SPHardwareDataType"}); + if not string.match(meta, "MacBookPro13,1") then + return + end + + local opts = require('nvim-treesitter.install') + opts.compilers = { "zig" } + opts.command_extra_args = { "--help" } end local parser_configs = parser_configs.get_parser_configs() From a77308a7615fbb14091f4767ba22d055a3a628d8 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 15 Jun 2023 10:14:27 +0200 Subject: [PATCH 2/4] [nix] Move the JB IDEs to Brew --- nix/hosts/alymac/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nix/hosts/alymac/default.nix b/nix/hosts/alymac/default.nix index 49f0ccb..fc66811 100644 --- a/nix/hosts/alymac/default.nix +++ b/nix/hosts/alymac/default.nix @@ -62,9 +62,6 @@ let ]; programs = [ - jetbrains.idea-ultimate - jetbrains.phpstorm - jetbrains.rider rectangle slack tailscale @@ -231,12 +228,16 @@ in "discord-ptb" "docker" "firefox" + "goland" "google-chrome" + "intellij-idea" "itch" "iterm2" "obs" + "phpstorm" "plexamp" "raycast" + "rider" "sequel-ace" "shottr" "spotify" From b6980f07c5d4a307a47dc709d776af12b39c27f1 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 15 Jun 2023 10:34:28 +0200 Subject: [PATCH 3/4] [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 From ae45a1f016619173433cf4372b8a3b54d30ba929 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Thu, 15 Jun 2023 10:34:59 +0200 Subject: [PATCH 4/4] [nix] Install Stylua and lua-language-server --- nix/hosts/alymac/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nix/hosts/alymac/default.nix b/nix/hosts/alymac/default.nix index fc66811..7d8cee9 100644 --- a/nix/hosts/alymac/default.nix +++ b/nix/hosts/alymac/default.nix @@ -30,11 +30,13 @@ let jq kubectl kubelogin-oidc + lua-language-server mosh nixpkgs-fmt pandoc ripgrep sops + stylua texlive.combined.scheme-small vim wget