This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-24
Channels
- # aws (2)
- # babashka (27)
- # beginners (97)
- # calva (1)
- # cherry (12)
- # cider (6)
- # clara (12)
- # clj-kondo (24)
- # clj-on-windows (4)
- # cljfx (14)
- # clojure (54)
- # clojure-australia (3)
- # clojure-europe (26)
- # clojure-nl (1)
- # clojure-norway (4)
- # clojure-uk (9)
- # clojurescript (65)
- # conjure (5)
- # cursive (7)
- # datomic (18)
- # emacs (6)
- # helix (2)
- # honeysql (1)
- # jobs (1)
- # joyride (15)
- # kaocha (2)
- # lsp (10)
- # malli (5)
- # nbb (12)
- # observability (5)
- # off-topic (5)
- # reitit (2)
- # releases (4)
- # ring (1)
- # sci (17)
- # shadow-cljs (34)
- # testing (29)
- # tools-deps (45)
- # vim (7)
- # xtdb (6)
I wonder what indent you are using with vim? I'm using 2 spaces and guns/vimsexp with tpope/vim-sexp-mappings-for-regular-people and finally vim-parinfer. I find myself aligning one space back and forth all the time
> "I find myself aligning one space back and forth all the time" Would this be for aligning multi-line lists to the first element?
I use vim-sexp but I don't use their alignment or vim's built-in alignment. I solely rely on LSP formatting the buffer on save. And even if I make any alignment using plugins then file save overwrites that.
@UJY23QLS1 sometimes, sometimes it's just because previous line/lines were indented by one or two and I want everything to be consistent
@U028ART884X okay, thats a good idea. how did you configure that?
I have this:
Plug 'lukas-reineke/lsp-format.nvim'
Then I have this:
require('lsp-format').setup {}
Then I also do this (notice the client
):
local on_attach = function(client, bufnr)
-- Foramt on save via `lukas-reineke/lsp-format.nvim`
require('lsp-format').on_attach(client)
Then I take this on_attach
and use it here:
local lspconfig = require('lspconfig')
for _, lsp_plugin_config in pairs(lsp_plugin_configs) do
local lsp_plugin_name = lsp_plugin_config[1]
local lsp_plugin_on_init = lsp_plugin_config[2]
lspconfig[lsp_plugin_name].setup({
capabilities = capabilities, -- nvim-cmp
on_attach = on_attach,
(this stuff is too long)
Pretty painful to set it up. But now it works for all kinds of languages and it's great! 😄
There are probably better ways to set it up. With my config I have a list of language names and this loop simply activates all of them.hm ok i'm looking at the plugin now