Skip to content

Commit

Permalink
Reconfigured mason for nixos
Browse files Browse the repository at this point in the history
Mason was failing previously on nixos because it couldn't install the
LSPs it wanted due to how NixOS works. As a workaround, i have tweaked
it (based on williamboman/mason.nvim#428) so
that it attempts to look for LSPs installed on the system before
installing its own version. This prevents the issue without requiring me
to remove mason completely (which i want for non-NixOS systems)
  • Loading branch information
Cian-H committed Apr 9, 2024
1 parent 18dc80a commit 3c10cdb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions home-manager/dotfiles/.config/nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ return {
-- That is to say, every time a new file is opened that is associated with
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
-- function will be executed to configure the current buffer

require("mason").setup {
PATH = "append",
}

vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
callback = function(event)
Expand Down

0 comments on commit 3c10cdb

Please sign in to comment.