u/Firm_Feedback_1178

▲ 2 r/rust

examples folder not in module tree?

I struggled with Rust until I saw a video tutorial of someone using Vim and ALE. Now I feel like a kid in a toy store. Except for one tiny thing. When I start a new program in the examples folder (so I can do :!cargo run --example demo, for example) rust-analyzer insists on whining about not finding the code "in the module tree", I eventually get annoyed enough to close Vim and immediately relaunch it on that file. Is there a magic curse I can recite or maybe an ALE setting that will make that close/reopen unnecessary?

reddit.com
u/Firm_Feedback_1178 — 23 days ago
▲ 6 r/vim

I discovered ALE during my venture into Rust programming, and I was so pleased with that experience I decided to add it to my C++ life. I'struggling with its confusion of C and C++. My current problem arises from what I believe is ALE using a C linter on a C++ header file: even though my code builds cleanly (no warnings or errors), ALE is giving me an "E: Unknown type 'class'" on the first line of my class declaration. FileType is recognized by Vim as 'cpp'. ALEInfo shows

Ignored Linters: []

In my ~/.vimrc I have this:

autocmd FileType cpp let b:ale_linters_ignore = {'cpp': ['cc', 'ccls', 'clangcheck']}

What I want to actually use is 'clangd', and I have this in ALEInfo:

Enabled Linters: ['clangd'].

How do I enforce that? ('cc', 'ccls', 'clangcheck' precede 'clangd' in the 'available linters' list. It seems to me that telling ALE to ignore those would have the desired effect.)

reddit.com
u/Firm_Feedback_1178 — 1 month ago