npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

colson-nvim

v1.0.5

Published

Colson Nvim: Neovim Code Editor/IDE for Software Engineers

Readme

Step into the realm of excellence with my world-class Neovim (nvim) configuration! This comprehensive guide unveils a meticulously crafted zenful setup, meticulously designed for unparalleled efficiency, productivity, and visual splendor within Neovim.

Embark on a journey through a domain enriched with powerful features, plugins, and finely tuned key bindings, addressing a diverse range of coding/text-editing requirements. Welcome to a sublime Neovim experience tailored to elevate your coding endeavors to new heights! 🔥

Installation through NPM

Ensure Neovim (v >= 0.9.0) and Node are installed on your machine!

$ npx colson-nvim
$ cd ~/.config/nvim
$ nvim .

Navigate to lua/colson/packer.lua
Execute this command in normal mode!

:so
:PackerSync

Restart Neovim in your desired workspace!

nvim .

If you've already installed this before then for the latest pull, do:

$ npx colson-nvim@latest

NOTE: Read the documentation below for indepth wisdom on proper installation and uses!

That's the beginning of the new world. A beginning of new experience, journey packed with challenges, integrated with tools used in daily lives, boosting productivity, enhancing engineers performance!

DEMO Screenshot

✨ New Updated Zenful Look (COLSON NVIM)

@ Neovim on Arch Linux

New Modern Look, September 2024 💎

colsonn nvim

colson nvim

Latest Fresh Look, July 2024 :)

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim


@ Neovim on macOS

2023/Early 2024 Look

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim

🔥 Discord Presence for Neovim

colson nvim

❕ Keeping Your Configuration Up-to-Date

I'm committed to consistently enhancing this Neovim setup with new features, optimizations, and additional plugins. To ensure you're making the most out of this dynamic configuration, I recommend checking for updates monthly!

As the configuration evolves, it's a good practice to sync your local repository with the latest changes. To do this, navigate to your Neovim configuration directory and run the following command:

cd ~/.config/nvim
git pull origin main

Prerequisites: Neovim 0.9.0 or Higher

Ensure a seamless experience by confirming your Neovim version meets the requirements. Execute the following command to check your Neovim version:

nvim --version

Upgrade to Neovim 0.9.0 or higher if needed, and dive into an enhanced coding experience with this dynamic configuration! 🚀

Table of Contents

Introduction

This Neovim configuration is a powerhouse of productivity enhancements and aesthetics. I've curated a selection of plugins, key bindings, and themes to provide a versatile and delightful text-editing experience. Whether you're a developer, writer, or anyone in need of a robust text editor, this setup has got you covered.

💎 Old Look (COLSON NVIM)

nvim IDE colson

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim

Installation

To embark on this Neovim journey, follow these steps:

  1. Clone this repository to your Neovim configuration directory:

    git clone https://github.com/colson0x1/colson-nvim ~/.config/nvim
  2. Install Packer.nvim for managing plugins:

    git clone https://github.com/wbthomason/packer.nvim \
      ~/.local/share/nvim/site/pack/packer/start/packer.nvim
  3. Launch Neovim and run :PackerSync to install and update plugins.

  4. Install JetBrainsMono Nerd Font:

    • Install the regular JetBrains Mono version to support Unicode and Programming Languages Icons in the Neovim IDE! https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/JetBrainsMono.zip

Now, you're all set to unleash the power of this Neovim configuration!

colson nvim

Features

Global Key Bindings

Leader Key

  • <Space> serves as the leader key for most key bindings.

Netrw: File Explorer

colson nvim netrw

  • <leader>pv: Open a file explorer with Netrw.

NvimTree (Right window pane file explorer)

  • <leader>e: Toggle NvimTree

NOTE: Make sure NvimTree is Opened!

  • <leader>+ - Increase the NvimTree (or current window) width by 5 columns.
  • <leader>- - Decrease the NvimTree (or current window) width by 5 columns.
  • <leader>fp - Manually set the width of the Project Pane.
Save Files

<leader>w - Save all open files.

Save and Exit Nvim

<leader>q: - Exit Neovim

NEW Look!

colson nvim nvimtree

Old Look

colson nvim nvimtree

Collaborative Editing

  • <leader>vwm: Start a Vim-With-Me collaborative editing session.
  • <leader>svwm: Stop a Vim-With-Me collaborative editing session.

Text Manipulation

  • ``: Delete selected text in visual mode.
  • ``: Yank text to the system clipboard.
  • Ctrl+y: Yank the entire line to the system clipboard.
  • ``: Delete text without clobbering the register.
  • Ctrl+c: Exit insert mode.

Code Formatting

  • <leader>f: Format code using LSP (Language Server Protocol).
  • Even awesome: :w triggers Prettier for code formatting!

Navigation

  • <C-k> and <C-j>: Navigate through the quickfix list.
  • <leader>k and <leader>j: Navigate through the location list.

Search and Replace

Search and Replace

  • <leader>sr: Perform a search and replace using Telescope.

Normal Mode Key Bindings

Line Manipulation

  • <leader>k and <leader>j: Move the current line up or down.
  • <leader>K and <leader>J: Copy the current line up or down.
  • <leader>dd: Delete the current line.
  • <leader>cc: Duplicate the current line.

Scrolling

  • ** and **: Scroll down or up.

Code Navigation

  • gd: Go to definition.
  • gf: Go to file.
  • gy: Go to type definition.
  • gi: Go to implementation.
  • gr: Show references.
  • ``: Rename symbol.

Ex Mode

  • :W: Write the current file.
  • :Wq: Write and quit.
  • :WQ: Write and quit (forceful).
  • :Wqa: Write all and quit.

Git Integration

  • <leader>gs: Git status.
  • <leader>gc: Git commit.
  • <leader>gp: Git push.
  • <leader>gl: Git log.

Harpoon Integration

  • Ctrl+e: Harpoon open quick list.
    • <leader>a: Harpoon add buffer.
  • Ctrl+t and Ctrl+h: Harpoon toggle buffer.

LSP Integration

  • Shift+k: LSP hover.
  • Ctrl+n: LSP toggle next in autocompletion.
  • Ctrl+p: LSP toggle previous in autocompletion.
  • Ctrl+k or Ctrl+y: LSP select in autocompletion.
  • View Diagnostic Errors: <leader>dd or <leader>sd or <leader>vd

Telescope Integration

colson nvim telescope

colson nvim telescope

colson nvim telescope

colson nvim telescope

  • <leader>pf: Find files in the current directory.

NOTE: <leader> is SPACE

TELESCOPE GREP Search

Search by keyword in files!

colson nvim telescope grep search

colson nvim telescope grep search

  • <leader>ps: Live grep files.

🔥 NEW UPDATES

Bufferline

colson nvim bufferline

To enable bufferline (Tab based file buffer like VSCode), Go to: $ ~/.config/nvim Open nvim: $ nvim . Navigate to packer.lua and uncomment Bufferline Plugin After that, write :w and source it: :so and run packer sync: :PackerSync Now you're good to go!

  • <leader>h: Goes to next tab.
  • <leader>g: Goes to prev tab.
  • <leader>btl: Move tab left.
  • <leader>btr: Move tab right.
  • <leader>bd: Delete current tab.
  • <leader>bcl: Delete all tabs on left hand side.
  • <leader>bcr: Delete all tabs on right hand side.
  • <leader>abc: Close all tabs except currently opened one.

JSX/TSX & Other Languages Commenting

@ Commenting in Normal Mode

  • gcc - Toggles the current line using linewise comment.
  • gbc - Toggles the current line using blockwise comment.
  • [count]gcc - Toggles the number of line given as a prefix count using linewise comment.
  • [count]gbc - Toggles the number of line given as a prefix count using blockwise comment.
  • gc[count]{motion} - Toggles the region using linewise comment.
  • gb[count]{motion} - Toggles the region using blockwise comment

@ Commenting in Visual Mode

  • gc - Toggles the region using linewise comment.
  • gb - toggles the region using blockwise comment.

Discord Presence

  • Open discord first and then, open your workspace from terminal: nvim .

Emmet (For HTML/JSX Autocompletion)

  • !<Ctrl+k> To generate HTML standard boilerplate
  • .app-header<Ctrl+k>: Creates div with classname of app-header.
  • #root<Ctrl+k>: Creates div with id of root.
  • .flex.color-blue-600: Creates div with classnames - flex color-blue-600.
  • div<Ctrl+k>: Creates div element.
  • nav>ul>li*2<Ctrl+k>: Creates
    <nav>
      <ul>
        <li></li>
        <li></li>
      </ul>
    </nav>
  • `p+span<Ctrl+k>: Creates
    <p></p>
    <span></span>
  • .className<Ctrl+k>: Creates div with prop className which can be useful for styling with css modules, tailwind or mixing with style components.

Tailwind CSS IntelliSense

  • Use <Ctrl+k> to select when you use tailwind: Ex when you type text- in className='text-', you get autocompletion!
  • Use <Ctrl+k to select in autocompletion.
  • Use <Ctrl+n to go to next in the occurrence.
  • Use <Ctrl+p to go to prev in occurrence.

Gen Lorem Ipsum

  • To generate lorem ipsum paragraph: In normal mode, type :Lorem
  • To generate specified constraint of words: :Lorem 10 which generates 10 words.

Code Fold

  • To use code folding: First go to Visual Line Mode using Shift+v. After that use j or k to select block of code. Now use: zf to fold code. To unfold the code, go to the code fold line and use: zo to open the code fold.

Live Server

  • First install live server globally: sudo npm install -g live-server
  • Now inside Neovim: Go to index.html and on Normal Mode, type: :LiveServerStart to start the server and :LiveServerStop to stop the server.

System Clipboard Copy

First install xclip on your machine in order for the configurations to work:

$ sudo pacman -S xclip

Then open any workspace with nvim . in Tmux environment. Now you're ready to go!

  • NORMAL OR VISUAL MODE: <leader>y - Copies to system clipboard.
  • NORMAL MODE: <leader>Y - Copies text from cursor to the end of the line to the system clipboard.

🚀 React Snippets Autocompletion

For this to work, the main package depends upon this dependency Ultisnips which requires pynvim installed on your machine. First, let's verify if python3 support is enabled inside your nvim environment.

cd ~/.config/nvim
nvim .

Open packer.lua and in normal mode: Type

:echo has('python3')

If it returns 1, we're good to go else we need to install the dependencies to enable the support inside the neovim environment.

Here's how to do it:

$ sudo pacman -S base-devel cmake unzip
$ sudo pacman -S python-pynvim

Now, again open that packer.lua file and verify if we've got access to the python3 inside neovim environment. This time, it should return 1 aka OKAY!

Now, make sure you're synced with my latest configuration!

$ cd ~/.config/nvim
nvim .

Open packer.lua

:so
:PackerSync

Yay, finally now we should be able to use React Snippets!

🔥 React Snippets Guide

Use <Ctrl+l> after you type the trigger code!

Functional Components

| Trigger Code | What it does | | ------------ | ------------------------------------------ | | fce | Function Component Export | | fcde | Function Component Default Export | | sfce | Simple Function Component Export | | sfcde | Simple Function Component Default Export | | useS | useState | | useE | useEffect | | useEA | useEffect async | | useC | useContext | | useRed | useReducer | | useCB | useCallback | | useM | useMemo | | useR | useRef | | useI | useImperativeHandle | | useL | useLayoutEffect | | useDV | useDebugValue | | useT | useTransition |

Class Components

| Trigger Code | What it does | | ------------ | ----------------------------------------- | | rce | React Class Component Export | | rcep | React Class Export with Prop interface | | rceps | React Class Export with Props and State | | rcc | React Class Component | | rcon | React Class Constructor | | spt | Static PropTypes | | sdp | Static Default Props | | sdpt | Static Default Props Typed | | cdm | Component Did Mount | | cdu | Component Did Update | | cdc | Component Did Catch | | cwum | Component Will Unmount |

General Redux + Redux Toolkit

| Trigger Code | What it does | | ------------ | ------------------------ | | useDS | useDispatch | | useSL | useSelector | | cs | createSlice | | ecs | export createSlice | | cpr | create prepare reducer | | cat | createAsyncThunk |

🎯 TypeScript/JavaScript Engine: Cool Features

  • @ sorts and removes unused imports: <leader>oi or <leader>soi
  • @ sorts imports: <leader>si
  • @ removes unused imports: <leader>ui or <leader>ri
  • @ adds imports for all statements that lack one and can be imported: <leader>ai
  • @ fixes all fixable errors: <leader>fe
  • @ goes to source definition (available since TS v4.7): <leader>d
  • @ allow to rename current file and apply changes to connected files: <leader>rr or <leader>rn or <leader>rf
  • @ find files that reference the current file (available since TS v4.2): <leader>fr

Cool Pre-Configured Themes

The themes are configured already but I've commented out rest. Feel free to explore these themes and uncomment the one that resonates with your taste!

Preconfigured themes:

@ Github Themes - Has flavors

@ Jetbrains IDE Theme

@ Tokyo Night Theme - Has flavors

@ Catppuccin Theme - Has flavors

@ Rose Pine Theme - Has flavors

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim

colson nvim

END: May your coding journey with Neovim be nothing short of stellar! 🚀

Peace! 🕊