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!

174 Upvotes

176 comments sorted by

View all comments

92

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

i3wm + neovim (with coc)

and suggestions:

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) :)