Code Monkey home page Code Monkey logo

Comments (5)

kovisoft avatar kovisoft commented on August 21, 2024

No, this is not a typo. The hyperspec (api documentation) is defined per language, so g:slimv_clhs_root is defined/accessed for lisp in slimv-lisp.vim and g:slimv_cljapi_root is defined for clojure in slimv-clojure.vim. In the (mostly) language independent code slimv.vim there should be no language specific api definition accessed, it is handled by the language specific SlimvHyperspecLookup() function.

Actually g:slimv_hs_root is a leftover from earlier slimv versions and as I see currently it is used as a general hyperspec root for other languages.

Let's focus instead on the error message you got. Could you please tell me what was your exact variable definition and what error message you got?

from slimv.

notnotrandom avatar notnotrandom commented on August 21, 2024

This configuration in ~/.vim/ftplugin/lisp.vim (it is the same thing if it is in ~/.vimrc, or if I replace the ~ with the home folder):

let g:slimv_clhs_root="~/tmp/HyperSpec/Body/"

Causes this error in vim, when the cursor on top of a standard function/etc, and documentation is invoked:

Error detected while processing function SlimvHyperspec..SlimvLookup:
line   28:
E121: Undefined variable: g:slimv_hs_root
E116: Invalid arguments for function exists( g:slimv_hs_root )
E15: Invalid expression: match( symbol[1], ':' ) < 0 && exists( g:slimv_hs_root )
line   40:
E121: Undefined variable: page
E15: Invalid expression: '! ' . g:slimv_browser_cmd . ' ' . page . ' ' . g:slimv_browser_cmd_suffix

Removing the let g:slimv_clhs_root everything works properly, but the online spec is accessed (which is what I wanted to avoid).

from slimv.

kovisoft avatar kovisoft commented on August 21, 2024

Ah, thanks, now I see what the problem is: g:slimv_hs_root is not enclosed in quotes.
Could you please check that you change this line (line 3175):

        if match( symbol[1], ':' ) < 0 && exists( g:slimv_hs_root )

to this:

        if match( symbol[1], ':' ) < 0 && exists( 'g:slimv_hs_root' )

and keep your let g:slimv_clhs_root settings in your .vimrc. Does it solve the problem?

from slimv.

notnotrandom avatar notnotrandom commented on August 21, 2024

Yes it did! Yay :D

On Mon, May 11, 2015 at 05:23:41am -0700, Tamas Kovacs wrote:

Ah, thanks, now I see what the problem is: g:slimv_hs_root is not enclosed in quotes.
Could you please check that you change this line (line 3175):

       if match( symbol[1], ':' ) < 0 && exists( g:slimv_hs_root )

to this:

       if match( symbol[1], ':' ) < 0 && exists( 'g:slimv_hs_root' )

and keep your let g:slimv_clhs_root settings in your .vimrc. Does it solve the problem?


Reply to this email directly or view it on GitHub:
#28 (comment)

Γ“scar Pereira | https://erroneousthoughts.org

Rules of Optimisation:
Rule 1: Don't do it.
Rule 2 (for experts only): Don't do it yet.
-- M.A. Jackson

from slimv.

kovisoft avatar kovisoft commented on August 21, 2024

OK, thanks for the test. I committed the fix in 97932fc

from slimv.

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.