Coder Social home page Coder Social logo

Comments (13)

volkswagenfeature avatar volkswagenfeature commented on May 27, 2024

A workaround I'm using at the moment is just to make a symlink where it expects to see the folder:

sudo ln -s /nix/store/7vaavg9j2q0xg6w1wr42hir1vbsh2b90-neovim-0.7.0/share/nvim/runtime /etc/nvim

I'm sure there's a more sensible way to get the hash in the nix store path, but since I'm new to Nix I've just been using file $(which nvim) to find out where it's located.

from nixvim.

pta2002 avatar pta2002 commented on May 27, 2024

I'll take a look at this, but now that 21.11 is released (and AFAICT it works there), maybe it's not worth patching in the support for older versions. If there's enough demand I'll add something for this though.

from nixvim.

volkswagenfeature avatar volkswagenfeature commented on May 27, 2024

Yeah, mostly opened for continuing tracking on the $VIMRUNTIME issue that's been following us... I actually suspect it's still present in 21.11 some situations. I've had it crop up since upgrading, but I haven't yet taken the time to make it reproducible, so it might be my imagination.

from nixvim.

JulienMalka avatar JulienMalka commented on May 27, 2024

I can confirm that I've also been having this issue on NixOS 22.11

from nixvim.

Church- avatar Church- commented on May 27, 2024

Same here, also having this issue.

from nixvim.

pta2002 avatar pta2002 commented on May 27, 2024

Ah damn it, thought it had gone away! Can you share a basic config @JulienMalka and @Church-? Also, what module are you using to set up nixvim?

from nixvim.

Church- avatar Church- commented on May 27, 2024

Hey there, I'm using the nixOS module to set up my config, and my config is

{ pkgs, config, ... }:

{
  programs = {
    nixvim = {
      enable = true;
      viAlias = true;
      vimAlias = true;
      options = {
        termguicolors = true;
        background = "dark";
        ignorecase = true;
        swapfile = false;
        showmatch = true;
        hlsearch = true;
        wildmode = [ "longest" "list" ];
        expandtab = true;
        tabstop = 4;
        shiftwidth = 4;
      };
      extraConfigVim = ''
        set completeopt=menuone,noinsert,noselect              
        set shortmess+=c                                       
        set whichwrap+=<,>,h,l,[,]                             
        au BufRead,BufNewFile *.md setlocal textwidth=80       
        au BufRead,BufNewFile *.yaml setlocal textwidth=80 shiftwidth=2 cc=80
        au BufRead,BufNewFile *.yml setlocal textwidth=80 shiftwidth=2 cc=80
        au BufRead,BufNewFile *.sls setlocal textwidth=80 shiftwidth=2 cc=80
        au BufRead,BufNewFile *.sh setlocal textwidth=80 shiftwidth=2 cc=80
        au BufRead,BufNewFile *.nix setlocal textwidth=80 shiftwidth=2 cc=80
        au BufRead,BufNewFile *.js setlocal textwidth=80 shiftwidth=2 cc=80
        au BufRead,BufNewFile *.ts setlocal textwidth=80 shiftwidth=2 cc=80
        au BufRead,BufNewFile *.lua setlocal textwidth=80 shiftwidth=2 cc=80                                                  
        au BufRead,BufNewFile *.py setlocal textwidth=80 shiftwidth=4 cc=88                                                   
        au BufRead,BufNewFile *.rs setlocal textwidth=80 shiftwidth=4 cc=80
        au BufRead,BufNewFile *.c setlocal textwidth=80 shiftwidth=4 cc=80
        au BufRead,BufNewFile *.go setlocal textwidth=80 shiftwidth=4 cc=80
        au BufWrite *.rs :Autoformat
        au BufWrite *.nix :Autoformat
      '';
      plugins = {
        lsp = {
          enable = true;
          servers = {
            rnix-lsp = { enable = true; };
            rust-analyzer = { enable = true; };
          };
        };
      };
    };
  };
}

from nixvim.

volkswagenfeature avatar volkswagenfeature commented on May 27, 2024

Changed name to reflect that this is no longer a 22.05 issue. I also had the same thing pop up on 22.11 on my WSL install: see configuration

from nixvim.

k4lipso avatar k4lipso commented on May 27, 2024

can confirm the same issue with nixpkgs/nixos-unstable. creating the symlink as mentioned by @volkswagenfeature worked for me.
still i have to point nvim to the correct config using nvim -u /etc/nvim/sysinit.lua

from nixvim.

alexjp avatar alexjp commented on May 27, 2024

In my case, the runtime issue was fixed with commenting this line: https://github.com/pta2002/nixvim/blob/main/wrappers/nixos.nix#L35

from nixvim.

lumpsoid avatar lumpsoid commented on May 27, 2024

same here
but non of the tricks here works for me

it is strange that, but I am not so experienced with NixOS, when I added nixvim, the log sayed that ... input 'nixvim/pre-commit-hooks/nixpkgs-stable' but the documentation stated that nixvim needs an unstable version

NixOS with flakes

{
    description = "lump";

    inputs = {
        nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
        home-manager.url = "github:nix-community/home-manager";
        home-manager.inputs.nixpkgs.follows = "nixpkgs";
	nixvim.url = github:pta2002/nixvim;
	nixvim.inputs.nixpkgs.follows = "nixpkgs";
    };

    outputs = inputs@{ nixpkgs, home-manager, nixvim, ... }: {
        nixosConfigurations = {
            qq = nixpkgs.lib.nixosSystem {
                system = "x86_64-linux";
                modules = [ 
                    ./configuration.nix 
                    home-manager.nixosModules.home-manager {
                        home-manager.useGlobalPkgs = true;
                        home-manager.useUserPackages = true;
                        home-manager.users.qq = import ./home.nix;
                    }
		    nixvim.nixosModules.nixvim {
		        programs.nixvim = {
		        	enable = true;
		        	options = {
		        		number = true;
		        		relativenumber = true;
		        		shiftwidth = 4;
		        		tabstop = 4;
		        	};
		        	plugins.oil.enable = true;
		        	plugins.lightline.enable = true;
		        	maps = {
		        		normal."-" = {
		        			action = "<cmd>require('oil').open";
		        		};
		        	};
		        };
		    }
                ];
            };
        };
    };
}

and I also have problem with infinite loop if I trying to call nixvim from ./home.nix

from nixvim.

ToyVo avatar ToyVo commented on May 27, 2024

In my case, the runtime issue was fixed with commenting this line: https://github.com/pta2002/nixvim/blob/main/wrappers/nixos.nix#L35

Setting wrapRc = true; fixed this issue for me on nixos-unstable. My config worked just fine on nix-darwin and I noticed the darwin wrapper has wrapRc forced to true, so I guess I need true for both

from nixvim.

teto avatar teto commented on May 27, 2024

wrapRc sets VIM which is used as VIMRUNTIME see :h VIMRUNTIME

from nixvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.