My name is David Guevara. I use neovim
as my main editor and you can see my configuration files here.
You can contact me using my email: [email protected].
datwaft's neovim configuration
My name is David Guevara. I use neovim
as my main editor and you can see my configuration files here.
You can contact me using my email: [email protected].
First of all, thank you for all of the macros!
I see that your pack! macro should add packages to the global compile-time variable conf/pack
. From what I understand, this means I should be able to add (pack!
statements in multiple files, as long as those files are required
before unpack!
is ran. However, when I use pack!
in other files, require those files, then call unpack!
the packages declarations are loaded to packer.nvim. I was wondering how should I go about doing this
Hi,
First of all, thank you for sharing your repos. I learned many good things from yours. What's your point of view if integrate which-key.nvim
into map!
and/or noremap!
macro?
In opts
arg, we could introduce {:des "Description of binding"}
, inside those maps, we could evaluate if which-key
module exist?
/loaded?
. If the {:des ...}
is not present in opts
we could safely skip which-key binding.
One more thing, you could improve let! macro
to be less repetive by support a list like
(let! opt1 val1
opt2 val2
opt3 val3
...)
Hi! I was just wondering why
It would make sense to use a global if you were to part the pack!
statements to different files and then unpack them at once, though thats much harder to do compile-time, and vice versa (as you have all the plugins in one file a local would work as well)
I was working on a "module system" (where sets of plugins and configurations are defined in a module thats loaded via a macro ala doomemacs) and was trying to part out the package declarations into their own files, but currently that means having to include
them which gets messy very quickly
Add a macro like set!
but using vim.opt_local
.
Example of use:
(augroup! disable-spell-on-filetypes
(autocmd! FileType [help packer]
#(setlocal! nospell)))
Like on here.
This is to only activate these bindings when there is a LSP active.
augroup!
macro only executes the first statement.
e.g.
; Set terminal options
(augroup! terminal-options
; Enter Terminal-mode (insert) automatically
(autocmd! TermOpen *
"startinsert")
; Disables line number on terminal buffers
(autocmd! TermOpen *
#(do
(set-local! nonumber)
(set-local! norelativenumber)))
; Disables spell on terminal buffers
(autocmd! TermOpen *
#(set-local! nospell))
; Disables sign column on terminal buffers
(autocmd! TermOpen *
#(set-local! signcolumn :no)))
augroup!
should execute all statements.
augroup!
only executes the first autocmd!
.
Add function support to set!
macro so that the macro can be used like:
(set! foldtext #(vim.fn.printf " %-6d%s"
(- vim.v.foldend (+ vim.v.foldstart 1))
(vim.fn.getline vim.v.foldstart)))
Add symbol list support to autocmd!
macro so that the macro can be used like:
(autocmd! VimOpen * #(function))
Or like:
(autocmd! [BufferOpen BufferClose] [*.fnl *.txt] #(function))
Hello, thank you once again for the excellent set of macros
I was recently trying out the highlight!
macro, with the following code:
;; subtle delimiters
(highlight! MatchParen [:underline] {:bg :#262626})
;; transparent vertical splits
(highlight! Vertsplit [:none] {:fg :#161616})
;; bold various syntax & TODO
(highlight! Todo [:bold] {:fg :#42be65 :bg :#262626})
(highlight! TSSymbol [:bold] {:fg :#3ddbd9})
(highlight! TSFunction [:bold] {:fg :#ff7eb6})
Which compiles to the following via hotpot:
vim.api.nvim_set_hl(0, "MatchParen", {bg = "#262626"})
vim.api.nvim_set_hl(0, "Vertsplit", {fg = "#161616"})
vim.api.nvim_set_hl(0, "Todo", {fg = "#42be65", bg = "#262626"})
vim.api.nvim_set_hl(0, "TSSymbol", {fg = "#3ddbd9"})
vim.api.nvim_set_hl(0, "TSFunction", {fg = "#ff7eb6"})
vim.api.nvim_set_hl(0, "Todo", {fg = "#42be65", bg = "#262626"})
vim.api.nvim_set_hl(0, "TSSymbol", {fg = "#3ddbd9"})
vim.api.nvim_set_hl(0, "TSFunction", {fg = "#ff7eb6"})
As you can see, bold/underline don't get passed to nvim_set_hl
. Am I using it incorrectly by any chance?
Code:
;; Disable built-in plugins
(defn- disable-distribution-plugins []
(let [built-ins [:netrw
:netrwPlugin
:netrwSettings
:netrwFileHandlers
:gzip
:zip
:zipPlugin
:tar
:tarPlugin
:getscript
:getscriptPlugin
:vimball
:vimballPlugin
:2html_plugin
:logipat
:rrhelper
:spellfile_plugin
:matchit]
providers [:perl :python :python3 :node :ruby]]
(each [_ v (ipairs built-ins)]
(let [b (.. :loaded_ v)]
(let! b 1)))
(each [_ v (ipairs providers)]
(let [p (.. :loaded_ v :_provider)]
(let! p 0)))))
(disable-distribution-plugins)
Expected behavior: all builtins and host-providers should be disable
Actual behavior: none of the above is set
Fix by using normal nvim api: (tset vim.g p 0)
or (tset vim.g b 1)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.