Skip to content

Mac dot files for the terminal, nvim, vim, VSCode, and more

Notifications You must be signed in to change notification settings

AmielCyber/MacDotFiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MacDotFiles

Mac OS dot files for the terminal, nvim, vim, VSCode, and more

NeoVim Configuration

This is a reminder on how to setup my current configuration for other machines, since I just switched from vim to neovim. I also made this as a walkthrough for one of my friends who was curious about Neovim. You are free to use this configuration, but cannot guarantee that it will work straight of the box.

Screenshots

Neovim Configuration

Dot Files Directory

Github File Directory

├── README.md
├── iterm2
│   └── colorschemes
│       └── monokai_pro.itermcolors
└── nvim
    ├── README.md
    ├── after
    │   └── plugin
    │       └── pluginconfigs.lua
    ├── init.lua
    └── lua
        ├── keymappings.lua
        ├── lsp.lua
        ├── plugins.lua
        └── vimsettings.lua

Actual Directory in Your Unix Home Directory After installation

~/
├── .config
│   ├── iterm2
│   │   └── colorschemes
│   │       └── monokai_pro.itermcolors
│   └── nvim
│       ├── after
│       │   └── plugin
│       │       └── pluginconfigs.lua
│       ├── init.lua
│       ├── lua
│       │   ├── keymappings.lua
│       │   ├── lsp.lua
│       │   ├── plugins.lua
│       │   └── vimsettings.lua
│       └── plugin
│           └── packer_compiled.lua
└── .vim
    └── undodir

Neovim Setup

  1. Recommended package installs using your preffered package manager. For example, using brew:

    • brew install git
    • brew install neovim
    • brew install ripgrep
    • brew install cmake
    • brew install fd
  2. Install packer.nvim

  3. Copy the nvim directory into the ~/.config/ directory

  4. In Neovim run the following:

    • :PackerClean
    • :PackerCompile
    • :PackerInstall
  5. Install the Luanguage Server Protocol for your languages

    • LSP installation goes like this:
      • First install treesitter's language parser for correct color highlighting using this vim command :TSInstall <language_to_install>
      • Then install the Language Server Protocol using the nvim-lsp-installer plugin with the following vim command :LSPInstall <language> then choosing the luanguage server for that language _ Additional configuration may be required for LSP configuration. _ See nvim-lspconfig/doc/server_configurations.md for dependencies and additional configuration for that particular server.
  6. Setup the capabilities for the LSP to run with the cmp plugin in the lua cmp.setup({ function in the init.vim file

    • Should be a simple line with LSP's defaults like this:
      • require['lspconfig']['YOUR_LANGUAGE_SERVER'].setup{ capabilities = capabilities}
        • You may need to add more to the body for more options to your liking or required configurations for that server
        • Refer to the nvim-lspconfig doc for those configurations or mason.nvim

Note:

Undo directory plugin

Neovim settings file in ~/.config/nvim/lua/vimsettings.lua will create the folder below

~/
└─── .vim/
     └── undodir/

If you want the undodir to be somewhere else, then change this line vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" located in the directory ~/.config/nvim/lua/vimsettings.lua to your desired directory

Plugin Dependencies

Some plugins may have language package manager dependencies or other dependencies

  • Be sure to read the readme file for any plugin
    • You can do so, by adding the github address to the short hand notation in the plugin section in ~/.config/nvim/lua/vimplugins.lua
Inspired By

My Neovim configuration is inspired by the following members of the neovim community

iTerm2 Configuration

Screenshots

iTerm Configuration Desktop Wallpaper by Alena Aenami

Following plugins for the zsh shell:

iTerm color

TO DO

  • Add a vim configuration slightly adjusted from my linux terminal in the future.

  • Separate neovim settings, plugins, mappings, and lua code in different files instead of having everything in a single init.vim file.

About

Mac dot files for the terminal, nvim, vim, VSCode, and more

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages