Skip to content

Dotfile configurations mainly for vim, byobu, bash and git.

Notifications You must be signed in to change notification settings

farhanmustar/dotfiles

 
 

Repository files navigation

Configuration files.

Usage:

git clone https://github.com/farhanmustar/dotfiles ~/dotfiles
rsync -a ~/dotfiles/ ~
rm -rf ~/dotfiles

This configuration require vim 8.0. Older ubuntu system need to update vim using third party source.

sudo add-apt-repository ppa:jonathonf/vim -yu
sudo apt-get install vim -y

PPA list for Ubuntu

PPA for neovim

sudo add-apt-repository ppa:neovim-ppa/unstable -yu
sudo apt-get install neovim -y
sudo update-alternatives --install $(which vim) vim $(which nvim) 50
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/vim 100

PPA for universal-ctags (for older ubuntu)

sudo add-apt-repository ppa:hnakamur/universal-ctags -yu
sudo apt-get install universal-ctags -y

PPA for ripgrep (for older ubuntu)

sudo add-apt-repository ppa:x4121/ripgrep -yu
sudo apt-get install ripgrep -y

Vim-Ale linter list

  • In vim, run :ALEInfo to find list of available linter.

Language Config

Vim

npm install -g vim-language-server

Python

  • ale-python-linter
    • vimrc Plugin 'farhanmustar/ale-python-linter'
  • jedi-language-server (jedils)
    • language server for python.
pip install jedi-language-server
  • python-language-server (pyls)
    • language server for python. (available for python 2.7)
pip install python-language-server
  • flake8
    • more detail checker especially in code formatting.
pip install flake8
  • bandit
    • security issue checker.
pip install bandit
  • debugpy
    • debugger for python app by simply prefix with python -m debugpy.
pip install debugpy

C++

  • clangd
    • Download binary file from clangd github release page.
      • Copy to bin dir.
    • for ROS development set env variable using shell or in vimrc
      • let $CPLUS_INCLUDE_PATH='/home/user/ws/devel/include/:/opt/ros/melodic/include/'
    • or run this command to generate the compile_command.json.
      • bash aliased to catkin_make_compile_commands
      • catkin_make -DCMAKE_EXPORT_COMPILE_COMMANDS=1
      • then link the generated compile_command.json file to outside the build folder for ale to find.
        • ln -sT /home/user/ws/build/compile_command.json /home/user/ws/compile_command.json
  • ccls
    • seems to be faster then clangd.
    git clone --depth=1 --recursive https://github.com/MaskRay/ccls
    cd ccls
    wget -c http://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
    tar xf clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
    cmake -H. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PWD/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-18.04
    cmake --build Release
  • codelldb
    • get download url from vscode-lldb release page.
    • download and extract using unzip.
    • then link to bin path.
    wget -c https://github.com/vadimcn/vscode-lldb/releases/download/v1.7.0/codelldb-x86_64-linux.vsix
    unzip codelldb-x86_64-linux.vsix
    ln -sT <codelldb>/extension/adapter/codelldb /usr/bin/codelldb

Node

  • node-debug2
    • need to clone and build on the same path since nvim config use that path.
    git clone https://github.com/microsoft/vscode-node-debug2.git ~/.bin/vscode-node-debug2
    cd ~/.bin/vscode-node-debug2
    npm install
    npm run build

Ros

Javascript

  • tsserver (language server for javascript and typescript)
npm install -g typescript
  • chrome debugger client
git clone https://github.com/Microsoft/vscode-chrome-debug ~/.bin/vscode-chrome-debug
cd ~/.bin/vscode-chrome-debug
npm install
npm run build
# run chrome/chromium-browser in debug mode.
google-chrome-stable --remote-debugging-port=9222

Svelte

  • svelte language server from vscode plugin
sudo npm i -g svelte-language-server

Dart

  • Tagbar support
    • Instal dart ctags.
git clone https://github.com/yoehwan/dart-ctags.git
cd dart_ctags
dart pub global activate -s path .
// or convert to native (exp for win)
cd dart_ctags
dart compile exe ./bin/dart_ctags.dart

Golang

  • gopls language server
go install golang.org/x/tools/gopls@latest

Lua

  • luacheck linter
sudo apt install lua-check

CSharp

  • dotnet sdk
sudo apt install dotnet-sdk-6.0
  • cs-language-server
    • need to install dotnet sdk first.
    • for .net 6 (lts) need to specify older version
dotnet tool install --global csharp-ls --version 0.5.7

HTML

  • tidy linter and formatter
wget -c https://github.com/htacg/tidy-html5/releases/download/5.9.14-next/tidy-5.9.14-Linux-64bit.deb
sudo dpkg -i tidy-5.9.14-Linux-64bit.deb

Terminal Apps

  • tldr
sudo apt install tldr
tldr -u

Things to explore

Push x11 session over vnc (mirror exisiting display).

sudo apt install x11vnc

About

Dotfile configurations mainly for vim, byobu, bash and git.

Topics

Resources

Stars

Watchers

Forks

Languages

  • Vim Script 61.7%
  • Lua 32.6%
  • Shell 5.3%
  • Other 0.4%