This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-30
Channels
- # announcements (40)
- # babashka (41)
- # beginners (32)
- # calva (15)
- # clara (8)
- # clj-kondo (14)
- # cljs-dev (30)
- # clojure (37)
- # clojure-dev (8)
- # clojure-europe (21)
- # clojure-norway (21)
- # clojure-uk (4)
- # clojured (3)
- # clojurescript (4)
- # community-development (10)
- # core-async (13)
- # cursive (23)
- # datomic (15)
- # emacs (9)
- # fulcro (3)
- # google-cloud (4)
- # graphql (24)
- # gratitude (2)
- # holy-lambda (4)
- # honeysql (5)
- # hyperfiddle (9)
- # keechma (1)
- # klipse (5)
- # lsp (23)
- # malli (4)
- # missionary (32)
- # pathom (28)
- # re-frame (2)
- # reagent (40)
- # reitit (17)
- # releases (2)
- # remote-jobs (1)
- # shadow-cljs (25)
- # specter (3)
- # vim (19)
- # xtdb (41)
When I'm already using vim-projectionist
, is there a way to create the alternate file if it doesn't exist?
if see the no alternate file
it means that projectionist does know what should be alternate file for the current buffer
for clojure and java projects I've configured them manually
(set vim.g.projectionist_heuristics
{"project.clj|deps.edn" {"src/*.clj" {:alternate "test/{}_test.clj"}
"test/*_test.clj" {:alternate "src/{}.clj"}}
"pom.xml" {"src/main/*.java" {:alternate "src/test/{}Test.java"}
"src/test/*Test.java" {:alternate "src/main/{}.java"}}})
Is there a simple configuration (or lua / fennel code) for removing trailing whitespace on a file when saving that file? So it would remove additional spaces at the end of every line and optionally more than one line at the end of the file. (I am afraid I understand very little of what the neovim docs are saying, although they are very detailed)
This is Lua auto-command that removes end of line whitespace on each save
vim.api.nvim_create_autocmd(
"BufWritePre",
{ pattern = "*", command = "%s/\\s\\+$//e" }
)
I use https://github.com/lispyclouds/dotfiles/blob/main/nvim/lua/whitespace.lua for my nvim 0.7+. Seems to work pretty well for my simple use cases 😄
@U11EL3P9U vim-better-whitespace looks interesting, although it may take me a while to translate that to my fennel config. Thanks
It seems there is no escape from adding those patterns in the config. I’ll just use a theme that hides the whitespace / indicators until I understand what those things mean Thanks
mine are essentially substitution patterns being executed as commands. like :%s/\s\+$//e
. the patterns are taken from https://github.com/cappyzawa/trim.nvim/blob/master/lua/trim/config.lua
when the buffer saves, it executes those commands in order
Help for debugging problem. Every once in a while, during a copy paste or opening a large file, nvim freezes. The CPU goes 100%, I wait a few minutes hoping for a time out, but normally I have to kill it. I just copy pasted a small json fragment into a markdown file. Should I look at the markdown plugin? Or perhaps is there a thread-dump facility I can see what nvim is doing?
You could try nvim --clean
to run with no plugins or configuration and see if it still happens. If it doesn't, disable half of your plugins and try again. Repeat until you find it. Or start with the ones you suspect first.
I'm not aware of a detailed resource monitor for nvim.
I've used :h profile
once, the profile output can help to figure out which plugin is slow. I've used this guide http://vimcasts.org/episodes/profiling-vimscript-performance/