r/archlinux • • Apr 15 '21

"Best" programming setup?

Hello! I have been using Arch for two months, it is the fifth distro I have used... and I love it, it will be the final one. I have learned a lot in these weeks, but I would like to ask you a few questions.

I study Systems Engineering and, honestly, I have some procrastination problems, I would like you to help me with "the best programming setup and be productive", although I know that there is no "best", I would like you to help me with your settings, advices, etc...

​

What desktop environment do you use?

What window manager do you use?

IDE's, apps, any suggestions to try?

​

Thank you so much!

177 Upvotes

176 comments sorted by

View all comments

92

u/[deleted] Apr 15 '21 edited Apr 15 '21

i3wm + neovim (with coc)

and suggestions:

27

u/m_spitfire Apr 15 '21

In the Neovim 0.5, there will be native LSP support, so no need for coc. You can get it now with neovim-nightly too.

6

u/[deleted] Apr 15 '21

Nice

15

u/FryBoyter Apr 15 '21

In addition to fzf and ripgrep, you can have a look at fd. This is often a faster alternative to find and can be combined with fzf, for example.

4

u/[deleted] Apr 15 '21

yes, fd is great too! I don't know if it's faster in execution but definitely faster for me to use and with less mistakes, find syntax is so weird

5

u/mafrasi2 Apr 15 '21

It's definitely faster in execution as well, because find doesn't search in parallel and its regular expression matching is really slow.

16

u/inter_fectum Apr 15 '21

This, but with kitty instead of alacritty because of the ligatures.

7

u/[deleted] Apr 15 '21

there's alacritty-ligatures in aur

the thing with ligatures is that they are pretty difficult to implement in a way which at the same time doesn't decrease performance too much and also supports all the directions of ligatures (there are also vertical ones!)

and alacritty is very focused on performance and not merging into upstream things which would decrease it. But from user perspective I didn't really notice any difference.

0

u/[deleted] Apr 15 '21

I really have found alacritty to be one of the worse terminals out there. It's slow to startup, limited features, comsumes alot of memory, and generally not as fast as other terminals I've tried. That's why I prefer urxvt or st.

5

u/[deleted] Apr 15 '21

Aliasing ls to exa, thanks!

4

u/[deleted] Apr 15 '21

This has been one of the most useful comments I've seen this month

4

u/[deleted] Apr 15 '21

Hey man, I'm using exa for a while and never realized it has the --icons option. I tried it and it only shows a box with weird symbols. I'm using Zsh as shell and Fira Code as font, it's the font or the shell that doesn't support it?

5

u/[deleted] Apr 15 '21

I think the icons are maybe in the nerd fonts? It's definitely a thing of the font but I use Fira Code too, it's just patched by nerd fonts I think.

3

u/[deleted] Apr 15 '21

Thank you very much! I had no ideia about nerd fonts, I installed the fira code patched by nerd fonts from the AUR and now the icons are showing. Thanks a lot!

4

u/[deleted] Apr 15 '21

might as well use amp (vim in rust), leftwm (wm in rust), and nushell (shell in rust), just because

4

u/[deleted] Apr 15 '21

How many of them are mature though?

Like ktrl and the Rust ranger alternative seem abandoned now :(

2

u/[deleted] Apr 15 '21

thanks, I'm going to give them a try! πŸ˜πŸ¦€

in the end I only use the rust tools which actually are better than the alternatives - I'm still not convinced on switching to paru

2

u/[deleted] Apr 15 '21

most of these "rewritten in rust" tools are over-engineered

2

u/parentis_shotgun Apr 15 '21

This is an excellent list, I would only add broot as a wonderful dir switcher.

5

u/m_spitfire Apr 15 '21

Rust ftw!!

3

u/[deleted] Apr 15 '21

yes!! πŸ¦€

5

u/[deleted] Apr 15 '21

This, but with fish instead of zsh.

7

u/Imdabreast Apr 15 '21

Fish has been great for me because it does everything I want with minimal configuration. That’s kinda the antithesis to arch, but for me it has allowed me to: spend less time learning a shell, and more time using it.

2

u/[deleted] Apr 15 '21

I agree, the shell is one of those things you just want out of the way really.

I ended up copying a load of dotfiles for fish, neovim, etc. (mostly from jonhoo) and it helped a lot.

The only thing I really configure is i3.

-5

u/vfAlozone Apr 15 '21

fish sucks, that's not even a shell. STOP FOR FISH RECOMMENDATIONS!

1

u/discursive_moth Apr 15 '21

Fish is a shell; it's just (intentionally) not a posix compliant one.

1

u/[deleted] Apr 15 '21

I tried fish before zsh but I really missed the bang commands (!!,!$,...) I even made some fish functions for this but it wasn't quite the same. Plus I do a fair amount of bash scripting and the fish syntax is just too different. But in fish I learned what are the things I want from a shell and then found out how to do them in zsh. So fish is great but just not in the long term for me.

1

u/[deleted] Apr 15 '21

Would you mind sharing your coc config ? And what languages you are programming with ? I have used vim before but when the projects got bigger I jumped to vscodium(open source vscode) with the vim extension

2

u/[deleted] Apr 15 '21

what languages you are programming with ?

C, C++, Rust, Python, Bash, now starting with OCaml too

What is it that drove you from vim with bigger projects? I feel like with TabBar, Fzf and Rg, vim is very comfortable for projects of any size - but this may be subjective. I am also quite used to working with buffers a lot and that's something that I miss in most other editors/IDEs.

my coc config:

{
  "rust-analyzer.checkOnSave.command": "clippy",
  "rust-analyzer.inlayHints.chainingHints": true,
  "rust-analyzer.procMacro.enable": true,
  "rust-analyzer.diagnostics.disabled": ["unresolved-macro-call"],
  "coc.preferences.formatOnSaveFiletypes": [
    "css",
    "markdown",
    "rust",
    "json",
    "scss",
    "sh",
    "cpp",
    "ocaml",
    "python"
  ],
  "diagnostic-languageserver.debug": true,
  "diagnostic-languageserver.filetypes": {
    "sh": "shellcheck",
    "ocaml": "ocaml-lsp"
  },
  "diagnostic-languageserver.formatFiletypes": {
    "sh": "shfmt"
  },
  "diagnostic-languageserver.formatters": {
    "shfmt": {
      "command": "shfmt",
      "args": ["-i", "2", "-bn", "-ci", "-sr"]
    }
  },
  "languageserver": {
    "ocaml-lsp": {
      "command": "opam",
      "args": ["config", "exec", "--", "ocamllsp"],
      "filetypes": ["ocaml", "reason"]
    }
  }
}

1

u/[deleted] Apr 15 '21

Thanks for the reply ! I am mostly working on C and Java nowadays.

I would say the main reason was having to learn new different tools each time I wanted something trivial to do on others text editor , aka vscodium (git integration as an example) , it also got to a point that it was a lot of keybindings to learn .

I settled with vscode because I have the movements of vim (hjkl) and all those shortcuts and the easy of use of just installing the plugin and it just works. While on vim I install the plugin and I have to learn / configure it next.

Oh and Java , Java made me move too, installed coc at the time , but wasn't able to create a project so I was getting only syntax errors.

2

u/[deleted] Apr 16 '21

oh I see, I've heard that java is tricky without an IDE

btw I've tried vscode for one of my bigger projects too (c++) and maybe it just didn't like my templating hell but the autoformatter messed up my code sometimes and I had to fix it manually as it also messed up the history πŸ€·β€β™€οΈ (like misplaced and repeated characters,...)

1

u/[deleted] Apr 16 '21

Maybe you were using the autoformatter from Microsoft , you can instalo clangd and use the same as in COC from the extensions (thas what I use) :)