Giter Site home page Giter Site logo

hibiscus.nvim's People

Contributors

alexmozaidze avatar d12bb avatar udayvir-singh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hibiscus.nvim's Issues

packer already has a "module" parameter

  module = string or list      -- Specifies Lua module names for require. When requiring a string which starts
                               -- with one of these module names, the plugin will be loaded.

Add `setlocal!` macro

While :set and thus set! behave the same as :setl for buffer-local options in appropriate context, :setlocal is required if wanting to locally set global-local options. (setlocal! <opt> <val>) (or setl!) would be much more elegant than (tset vim.bo :<opt> <val>).

command! macro doesn't work with the `buffer` argument

First of all, sorry if this is just some kind of missuderstanding on my end. I'm just learning how to use fennel.

I was trying the command! macro and the following code:

(import-macros {: command!} :hibiscus.vim)

(command! [:buffer true] :Example #(print "hey"))

compiles to the lua code:

local function _1_()
  return print "hey"
end
return vim.api.nvim_create_user_command("Example", _1_, { buffer = true, force = true })

The problem comes from the fact that nvim_create_user_command doesn't accept a buffer option (if you try to run this lua code, it will throw an error). Instead, the function nvim_buf_create_user_command should be used.

`set!` does not work with table values.

Hello!

It would seems that set! doesn't work for when a vim.opt can take a table, be it just with single values or key-value pairs.

An easy example:

(set! backspace [ "eol" "start" "indent" ])

Will give an error:

Error detected while processing /Users/alec-s/.config/nvim/init.lua:
E5113: Error while calling lua chunk: ...cache/nvim/hotpot/home/alec/.config/nvim/fnl/opts.lua:6: invalid value for option
stack traceback:
        [C]: in function '__newindex'
        ...cache/nvim/hotpot/Users/alec-s/.config/nvim/fnl/opts.lua:6: in main chunk
        [C]: in function 'require'
        /Users/alec-s/.config/nvim/init.lua:37: in main chunk
Press ENTER or type command to continue

But with just using tset:

(tset vim.opt "backspace" [ "eol" "start" "indent" ])

Works fine.

Suggestion for `set!`: take multiple symbols

Hello!

I thought I'd make a possible suggestion for set! and friends. In Emacs, setq takes, as its signature describes:

(setq [SYM VAL]...)

and as the beginning of its docstring says:

Set each SYM to the value of its VAL.

So you can have

(setq abbrev-mode t
      abbrev-file-name (concat my-local-dir "abbrev.el")
      save-abbrevs 'silent
      auto-insert-mode t
      auto-insert-query nil)

Granted I don't really know if it's best that set! is able to evaluate forms, but I think taking multiple "symbols" and values would be convenient.

Support `desc` field for autocmds

nvim_create_autocmd() supports a desc field to be displayed when looking up aucmds, see sample below. It would be nice if this could be used with the augroup! macro.

vim.api.nvim_create_augroup("d12bb", { clear = true })
vim.api.nvim_create_autocmd({ "BufEnter", "TermOpen" }, {
	group = "d12bb",
	pattern = "term://*",
	desc = "Insert only for terminals",
	command = "startinsert",
})

image

Feature request: Append/prepend variants of `(setlocal! ...)`

Thank you for the lovely library! Is there a chance we could get (setlocal+ ...) and (setlocal^ ...) macros, analogue to the non-local (set+ ...) and (set^ ...)? I've partially implemented these here, undocumented — I wasn't sure how to use the docgen script :p.

Buffer-local autocommands

VimScript example:

augroup lsp_document_highlight
  autocmd! * <buffer>
  autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
  autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
augroup END

'require config' on the packer macros are not working

image

I am trying to set the config files for the plugins by calling it inline when i set the plugins with use!, but it doesn't work.

The config file only works if i do the require separately (as you can see on the top of my file in the screenshot)

how to set listchars

hi all.
I have installed this plugin of latest version, and try to set! lcs, but I do not know how to use it correctly.

here is my code:

(import-macros {: set!} :hibiscus.vim)

(set! list true)
;; (set! listchars :eol "↵")  ;; yes, it works
(set! listchars "tab:→") ;; but this line failed

(set! listchars "tab:→") always failed, I also tried (tset vim.opt "listchars" {:eol "↵" :tab "→"}), and didn't work either.

So how do I set listchars correctly?
thanks.

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.