Skip to content

How can I use a remote nrepl in .nrepl-port? #594

Answered by agriffis
agriffis asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, thanks. I created a second file .nrepl-host and the following configuration in lazyvim

  {
    'Olical/conjure',
    lazy = true,
    ft = { 'clojure' },
    config = function(_, opts)
      local _, content = pcall(vim.fn.readfile, '.nrepl-host', '', 1)
      if content then
        vim.g['conjure#client#clojure#nrepl#connection#default_host'] = content[1]
      end
      require('conjure.main').main()
      require('conjure.mapping')['on-filetype']()
    end,
  }

I'm also using https://github.com/airblade/vim-rooter so my CWD is always the root of the project, so I don't have to do anything special to find .nrepl-host

This will work fine.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@agriffis
Comment options

Answer selected by agriffis
@Olical
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants