GithubHelp home page GithubHelp logo

geryescalier / neovim-config Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jairomer/neovim-config

0.0 0.0 0.0 26 KB

A repository with my vim configuration to sync across different development machines.

Python 4.56% Makefile 5.89% Dockerfile 7.15% Vim Script 82.39%

neovim-config's Introduction

VIM IDE deployment

What is this?

My attempt to have VIM as my main Integrated Development Enviroment.

Motivation

After having VSCode consume 15Gb of RAM for working with a C++ project, I had to find a more lightweight alternative. I need control of my tools to have control ver the quality of my work as a professional software developer.

Advantages

  • Open-source.
  • Battle tested.
  • Highly customizable.
  • Well documented.
  • Amazing community.
  • I already use in a day to day basis.
  • Lightweight.

Disadvantages

  • Difficult to learn at first.
  • No magic, you get what you put on it.
  • Requires understanding the whole development process.

Instalation

First you need neovim installed. This can be achieved several ways, using the default packet manager of your distribution, snap or pip. I prefer to go to the github repository and download the appimage.

The one liner to install the latest stable drop:

wget https://github.com/neovim/neovim/releases/download/stable/nvim.appimage && \
    chmod u+x nvim.appimage && \
    sudo mv nvim.appimage /usr/bin/vim

The next step is to clone this repository at $HOME/.config/nvim:

git clone https://github.com/jairomer/neovim-config.git $HOME/.config/nvim && \
    cd $HOME/.config/nvim && \
    git submodule update --init --recursive

Then, you might want to install the YouCompleteMe to have autocompletion on several programming languages:

cd $HOME/.config/nvim && python3 -m pip install --user --upgrade pynvim && python bundle/YouCompleteMe/install.py

There are several ways of installing this plugin that can be checked out at the README of YouCompleteMe.

C++ Autocomplete and linting

It is needed to configure each C++ project in order for autocomplete to work with c++17 and beyond. YouCompleteMe uses clangd as backend for the implementation of the language server. This means that if further flags are needed, they must be explictly defined on a custom .ycm_extra_conf.py such as the following:

import os
import os.path
import fnmatch
import logging
import ycm_core
import re


def getIncludesUnder(father):
    return [str("-I"+x[0]) for x in os.walk(father)]

def Settings( **kwargs ):
  BASE_FLAGS = [
          '-Wall',
          '-Wextra',
          '-Werror',
          '-Wno-long-long',
          '-Wno-variadic-macros',
          '-fexceptions',
          '-ferror-limit=10000',
          '-DNDEBUG',
          '-std=c++20',
          '-xc++',
          '-I/usr/lib/',
          '-I/usr/include/',
          ]
  BASE_FLAGS += getIncludesUnder(os.getcwd()+"/src")
  BASE_FLAGS += getIncludesUnder(os.getcwd()+"/3pp")
  return {
    'flags': BASE_FLAGS,
  }

Semantic completion and static analysis

Install and configure the latest versions for libclang and clang-tidy for your current distribution.

Enclosing of parenthesis, brackets, etc

For this I simply use delimitMate.

To enable it, we need to execute make all and make install.

Tmux

Tmux is a teminal multiplexer that enables multitasking on your workflow. It also provides a way of keeping several terminals active on remote servers, which is very useful when the internet connection fails.

Tmux can be downloaded and compiled from (here)[https://github.com/tmux/tmux].

To setup the tmux configuration file:

cp tmux.conf ~/.tmux.conf

PlantUML configuration

I followed this tutorial.

Now you can use Plantuml* commands inside vim.

neovim-config's People

Contributors

jairomer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.