Skip to content

wendellwt/nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

my own nvim config

How I was able to get a recent NeoVIM (0.10) installed and operating with Telescope+grep.

setup

use a decent gcc compiler:

    gcc --version
    gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)

compile nvim

see: Install from source

note: using gcc11

cmake needed this:

    sudo apt install gettext

here goes:

    git clone https://github.com/neovim/neovim
    cd neovim
    make CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=$HOME/neovim -DCMAKE_BUILD_TYPE=RelWithDebInfo"
    make install

LazyVim prerequisites

check on all prereqs

make sure PATH is set:

  export PATH=/home/wendell/pkgs/node-v15.14.0-linux-x64/bin:$PATH
  export PATH=~/.cargo/bin:$PATH
  export PATH=~/neovim/bin:$PATH

neovim:

    $ ~/neovim/bin/nvim --version
    NVIM v0.10.0-dev-2128+g78b000c74
    Build type: RelWithDebInfo
    LuaJIT 2.1.1703358377
    Run "nvim -V1 -v" for more info

git:

    $ git --version
    git version 2.33.0.664.g0785eb7

lazygit:

    $ lazygit
    lazygit: command not found

not sure how to install cargo; it was copied from another installation:

    # copied from elsewhere just to get tree-sitter:
    . "$HOME/.cargo/env"

    $ cargo --version
    cargo 1.75.0 (1d8b05cdd 2023-11-20)

and/or possibly these:

    cargo install cargo-update
    cargo install --force cargo-strip

did this on cssi-ciws (may not be right):

    sudo apt install fdclone

ripgrep (a cargo thing):

    $ rg --version
    ripgrep 13.0.0
    -SIMD -AVX (compiled)
    +SIMD +AVX (runtime)

fd (a cargo thing):

    $ fd --version
    fd 8.6.0

node, npm:

    export PATH=/home/wendell/pkgs/node-v14.21.3-linux-x64/bin:$PATH
    $ node --version
    v14.21.3
    lazyvim $ npm --version
    6.14.18

npm packages:

    $ npm install -g neovim
    + [email protected]
    added 35 packages from 25 contributors in 3.537s

get this repo

clone this repo:

    cd .config/
    mv nvim nvim_before_my_git
    git clone [email protected]:wendellwt/nvim.git

startup

run NeoVIM and let it install items

    nvim

remaining warnings:

  :checkhealth

  {flash.nvim}: unknown key <vscode>
  lazygit not installed
  No clipboard tool found.
  Perl is too old
  neovim-ruby-host not found
  conflicting keymap exists for mode **"n"**, lhs: **"gc"**

Lazy package manager

Installing NeoVim and Lazy (Package Manager)

which just says to populate lazy-config.lua with the right config

starting over

if you need to start over, just move all current items aside:

    cd ~/.config/       ; mv nvim nvim_bad

    cd ~/.local/share/  ; mv nvim nvim_bad
    cd ~/.local/state/  ; mv nvim nvim_bad
    cd ~/.cache/        ; mv nvim nvim_bad

possible way to get pyright to behave

  pip3 uninstall pyright

and remove site-package files

  pip3 install pyright

make sure about the recent node/nvim

and turn off everything via config file:

vim pyright.json
  {
    typeCheckingMode = "off"
  }

consider adding these (from Pyright Configuration ):

  analyzeUnannotatedFunctions  "false"
  strictParameterNoneValue     "false"
  enableTypeIgnoreComments     "false"

  reportMissingModuleSource    "none"
  reportInvalidTypeForm        "none"
  reportMissingImports         "none"
  reportUndefinedVariable      "none"

then, to test:

  pyright zip_route.py

Note: on cssi-ciws, it was very difficult to disable linters. There were:

  • flake8
  • pyright
  • pycodestyle
  • pyflakes

Various source files were deleted in these dirs:

  ~/.local/share/nvim/mason/packages/python-lsp-server/venv/bin/
  ~/.local/share/nvim/mason/packages/python-lsp-server/venv/lib/python3.10/site-packages

YMMV.

telescope

config file is .config/nvim/lua/plugins/telescope-nvim.lua

which has:

  options  = {
    previewer = true,
    grep_previewer = true,
  },

and:

  keys = {
      -- the one I was trying to get working all along:
      { "<leader>tg", builtin.grep_string, desc = "grep_string" },
  }

also, something like this is what others use:

  require('telescope.builtin').live_grep({
    search_dirs = { path },
    prompt_title = string.format('Grep in [%s]', vim.fs.basename(path)),
  })

refs:
Telescope live grep args
Telescope live_grep inside certain folders?

nerdfonts on windows

refs:
Beautify your Windows Terminal using Nerd Fonts and Oh-My-Posh

which says to:

  mkdir fira
  cd fira/
  wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.1/FiraCode.zip
  unzip FiraCode.zip

and then, in File Explorer:

    highlight all .ttf files
      -> Install

then, in PuTTY:

  -> Load
  -> Appearance
    FiraCode Nerd Font Mono

keymaps:

see neovim/nvim_dev_env_keymaps.odt on piedmont

pyproject.toml

#wt: argument-naming-style = "snake_case"
argument-naming-style = "any"

bad-names = [
    #wt: "foo",

good-names = [ # wt: "i",

disable = [
    # wt added:
    "redefined-outer-name",
    "trailing-newlines",
    "multiple-statements",
    ]

# wt: ignore-none = true
ignore-none = false

init-hook = 'import sys; sys.path.append("/home/wendell/.local/lib/python3.9/site-packages/"); '

About

my own nvim config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages