Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying any i. e. lua-based config #79

Closed
573 opened this issue Dec 22, 2020 · 1 comment
Closed

Trying any i. e. lua-based config #79

573 opened this issue Dec 22, 2020 · 1 comment

Comments

@573
Copy link

573 commented Dec 22, 2020

Hello,
I would like to integrate lua-based config (i. e. https://github.com/nathunsmitty/.config/blob/master/nvim/lua/lsp/init.lua) with neovim-nightly-overlay.

So far I tried :exe 'edit '.stdpath('config').'/init.vim' in nvim and put just

lua << EOF
local nvim_lsp = require('nvim_lsp')
EOF

as a test.

But when restarting nvim I get (shortened log):

Error detected while processing ~/.config/nvim/init.vim:
line 3:
E5108: Error executing lua [string ":lua"]:1: module 'nvim_lsp' not found:
no field package.preload['nvim_lsp']
no file './nvim_lsp.lua'
no file '/nix/store/62h7raxpscqaq0fzqzjk0dbgsr4njxij-luajit-2.1.0-2020-09-30/share/luajit-2.1.0-beta3/nvim_lsp.l
ua'
no file '/usr/local/share/lua/5.1/nvim_lsp.lua'
no file '/usr/local/share/lua/5.1/nvim_lsp/init.lua'
no file '/nix/store/62h7raxpscqaq0fzqzjk0dbgsr4njxij-luajit-2.1.0-2020-09-30/share/lua/5.1/nvim_lsp.lua'
no file '/nix/store/62h7raxpscqaq0fzqzjk0dbgsr4njxij-luajit-2.1.0-2020-09-30/share/lua/5.1/nvim_lsp/init.lua'

etc.

@573
Copy link
Author

573 commented Dec 22, 2020

To anwer myself: Don't.

Just use (in home.nix or configuration.nix), snippet:

programs.neovim = {
    enable = true;
    package = pkgs.neovim-nightly;
    extraConfig = ''
      lua << EOF
      local nvim_lsp = require('nvim_lsp')
      EOF
      '';
}

@573 573 closed this as completed Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant