Coder Social home page Coder Social logo

allaman / nvim Goto Github PK

View Code? Open in Web Editor NEW
590.0 13.0 67.0 8.73 MB

Straightforward and pure Lua based Neovim configuration for my work as DevOps/Cloud Engineer with batteries included for Python, Golang, and, of course, YAML

License: MIT License

Lua 99.64% Dockerfile 0.36%
neovim vim configuration golang devops dotfiles lua nvim python texteditor

nvim's Introduction

My Nvim Configuration

screenshot

πŸ’» This configuration works on my NixOS Linux as well as on my macOS. It requires and is tested with Neovim >= 0.10. It should run with Neovim 0.9.5 but I can't recommend it.

Have a look at my rice how my Linux machine is configured and at my mac-setup how my MBP is configured. My dotfiles are also on GitHub.

More Screenshots

Terminal: alacritty

Font: Jetbrains Mono

Leader Key Clusters via which-key

which-key

See ./lua/core/config/ui/which-key.lua for details.

Go development

go-dev

Debugging via DAP

dap

Motivation

There are many great Neovim configurations (see Inspiration), that give you a pleasant experience right out of the box, available. However, I am a long time (Neo)Vim user with a specific workflow and needs. Additionally, I do not have any Lua background and was not willing to spent too much time into that. Therefore, it was quite hard for me to customize and strip down the existing configs to my needs especially because the code is quite sophisticated.

I decided to move to my own fresh Lua based Neovim from my good old vimrc trying to accomplish the following principles.

Principles

  1. Migrate to Lua based alternative plugins respectively use only Lua based plugins (if possible).
  2. Keep the config as maintainable as possible knowing that this would possibly impact the code quality.
  3. Modular and meaningful directory structure and file naming.
  4. Just make it work and not make it beautiful πŸ˜ƒ. Of course, Neovim itself must look beautiful, but my focus is not on beautiful code or on utilizing all Lua features.

Features

General βš™οΈ

Navigation 🧭

Coding πŸ–₯️

Try out

If you have Docker on your system you can try out this configuration.

πŸ’‘ Due to installing required tools like LSPs, CLI apps, etc. the image is approximately 3 GB large

Dockerhub

There is a GitHub action in place that builds and pushes the Docker image to Dockerhub as allaman/nvim

Just start Neovim in container

docker run --name nvim --rm -it allaman/nvim

Mount a local directory (to ~/mount) and start Neovim

docker run --name nvim --rm -it -v ${HOME}/tmp:/home/nvim/mount allaman/nvim

Start container in bash instead of Neovim

docker run --name nvim --rm -it --entrypoint=/bin/bash allaman/nvim

Build the image

You can also build the image on your own

docker build -t nvim .

Replace allaman/nvim in the former commands with just nvim.

Requirements

There are some tools that are required in order to use some features/plugins:

Run :checkhealth core to check the status.

Tools

For the neo-tree delete functionality:

For Latex functionality:

  • Tectonic (can be changed in config.lua)
  • Skim (can be changed in config.lua)

LSPs, Formatting, Linters, DAP

The following programs should be installed on your system so that the appropriate tools can be installed:

  • Go
  • Python
  • NodeJs > 12
  • Cargo

All other

All other dependencies are managed by Mason. Tools are installed by running :MasonToolsInstall (in vim.fn.std path("data") .. "mason"). Mason requirements must be available on your system.

Bindings

Some bindings can be overwritten in your user config file. See ./lua/core/config/defaults.lua for possible settings.

Mode key binding
n space Leader key
n <c-h | j | k | l> Change window focus (including Tmux panes)
n <leader>Tab Switch to previously opened buffer
n <Tab> Switch to next buffer (bnext)
n <S-Tab> Switch to previous buffer (bprevious)
n st Visual selection with Treesitter hint textobject
v sa Add surrounding
n sd Delete surrounding
n sr Replace surrounding
n <c-Tab> Start auto completion
n/v ga Start mini.align (align text)
n gcc ToggleΒ line comment
n/v gc ToggleΒ line comment (works with movements like gcip)
n ss Jump to character(s) (flash.nvim)
i/s <c-j> Luasnip expand/forward
i/s <c-k> Luasnip backward
i <c-h> Luasnip select choice
n <c-n> Toggleterm (opens/hides a full terminal in Neovim)
i <c-l> Move out of closing brackets
n <CR> Start incremental selection
v <Tab> Increment selection
v <S-Tab> Decrement selection
n <c-f> Search buffer
i/v/n/s <c-s> Save file
n <leader>Rr Toggle Search and Replace (via Spectre)
n <leader>Rw Search (and replace) current word (via Spectre)
n <leader>Rf Search (and replace) in current file (via Spectre)
n <leader>Rc Replace current selection (in Spectre)
n <leader>RR Replace all (in Spectre)
n :LtexLang <lang> Set a specific language like "de-DE" for ltex-ls
n <leader>mc Enable GitHub Copilot (if plugin is enabled in your user config)
n <leader>tr Toggle Overseer (if plugin is enabled in your user config)
n <leader>r OverseerRun (if plugin is enabled in your user config)
n <leader>lf yazi.nvim or lf.nvim (if enabled in your user config)
n <leader>tz Toggle distraction free mode (if plugin is enabled in your user config)
n <leader>tF Disable auto formatting (if conform.nvim is enabled in your user config)
n <leader>tL Disable linting (if nvim-lint is enabled in your user config)

Hit <leader> to start which-key which gives you more mappings grouped by topic.

Structure

❯ tree -L 1 .
.
β”œβ”€β”€ after              # file specific settings
β”œβ”€β”€ config-example.lua # user-config file
β”œβ”€β”€ init.lua           # main entry point
β”œβ”€β”€ lazy-lock.json     # Lockfile for Lazy.nvim
β”œβ”€β”€ lua                # lua configuration
β”œβ”€β”€ snippets           # snippets directory (luasnip style)
└── spell              # my spell files linked from another repo
❯ tree -L 1 lua
lua
β”œβ”€β”€ config # Neovim config and user-config handling
β”œβ”€β”€ core   # checkhealth and plugins
└── utils  # utilities
❯ tree -L 1 lua/config
lua/config
β”œβ”€β”€ autocmds.lua # autocmds
β”œβ”€β”€ defaults/    # default configuration
β”œβ”€β”€ init.lua     # entry point
β”œβ”€β”€ lazy.lua     # plugin management
└── mappings.lua # "global" key mappings
❯ tree -L 1 lua/core
lua/core
β”œβ”€β”€ health.lua # :checkhealth core
└── plugins # plugins and their config

Each plugin to be installed is defined in ./lua/core/plugins/ in a separate file.

User configuration

The intention of my Neovim configuration was never to be a fully customizable "distribution" like LunarVim, SpaceVim, etc. but from time to time I like to change my color scheme and the idea of making this configurable came to my mind. Based upon this idea I implemented some further lightweight configuration options that might be useful.

The default configuration can be found in ./lua/config/defaults.

You can overwrite any of this configuration by writing a .nvim_config.lua file that follows the same structure as the default table and pick only those keys that you want to modify. Have a look at my user configuration in my dots repo. The configuration file should be placed in $XDG_CONFIG_HOME, $HOME, or the windows equivalent path.

You can start with cp ./config-example.lua $HOME/.nvim_config.lua.

Remove plugins

You can remove unwanted plugins by just removing the appropriate file in ./lua/core/plugins/. Lazy will take care of removing the plugin. You should also clean up any default configurations in ./lua/config/defaults.

Keep in mind that some plugins are configured to work in conjunction with other plugins. For instance, autopairs is configured in ./lua/core/plugins/treesitter.lua. For now there is no logic implemented that cross-checks such dependencies.

Add plugins

If you want to follow my method adding a plugin is straight forward:

Create a file in ./lua/core/plugins/ following the expected format of Lazy.

Open another instance of Neovim (I always try to keep one running instance of Neovim open in case I messed up my config) and run Lazy sync.

Inspiration

nvim's People

Contributors

allaman avatar dependabot[bot] avatar emretuna avatar malbertzard avatar mschneider82 avatar partounian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nvim's Issues

nvim-cmp does not work

I can autocomplete snippets by but can't jump between arguments in a function.

Do you know how can I do it?

Mac installation instructions

Hi there! I tried out your config via the Dockerfile, and I really like it. I'm not having success in getting things working natively on my Mac. I'm not a poweruser of Neovim/lua, so probably a bit out of my depth here, but figured I'd open this issue in case I'm missing clear set up instructions that exist somewhere.

Thx for the work on this! Really nice set up.

can not c open file in the file browser by mouse click

NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3

nvim config is last in main branch

errore message:

E5108: Error executing lua: ...lazy/nvim-window-picker/lua/window-picker/configurer.lua:49: attempt to index field 'unfocused' (a nil value)
stack traceback:
...lazy/nvim-window-picker/lua/window-picker/configurer.lua:49: in function '_backward_compatibility_config_changes'
...lazy/nvim-window-picker/lua/window-picker/configurer.lua:6: in function 'new'
...im/lazy/nvim-window-picker/lua/window-picker/builder.lua:40: in function 'build'
.../nvim/lazy/nvim-window-picker/lua/window-picker/init.lua:37: in function 'pick_window'
...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:710: in function 'open_file'
...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:562: in function 'open'
...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:595: in function 'open_with_cmd'
...y/neo-tree.nvim/lua/neo-tree/sources/common/commands.lua:726: in function 'open_with_window_picker'
...o-tree.nvim/lua/neo-tree/sources/filesystem/commands.lua:203: in function 'func'
...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:830: in function <...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:828>

Allaman in the Lazyman Neovim Configuration Manager

I'm working on including this configuration in Lazyman, a Neovim configuration manager.

In order to get this config to initialize cleanly with nvim --headless "+Lazy! sync" +qa it was necessary to patch mason.lua slightly to refresh the registry. Not sure why. Below is the patch I am using.

If you have any concerns, questions, comments, or suggestions as to how best to incorporate this configuration into Lazyman please feel free to fire away. It was one of the Neovim configs that motivated and inspired me to write a configuration manager. Your install.sh script acted as a template for the Lazyman install_neovim.sh although it has since diverged quite a bit. I kept your copyright notice intact, let me know if you want me to remove it.

I also based a lot of my own configuration off of some of what you have done, especially your settings.lua so thanks all around!

After patching (during the initial installation prior to initialization) the 'Allaman' Neovim configuration works well and I am planning on including it in the next release (v2.1.4r4).

mason.lua patch:

--- lua/core/plugins/mason.lua.orig	2023-06-05 18:56:59.153237963 -0700
+++ lua/core/plugins/mason.lua	2023-06-05 18:59:38.646269035 -0700
@@ -11,12 +11,19 @@
 
     -- ensure tools (except LSPs) are installed
     local mr = require("mason-registry")
-    for _, tool in ipairs(settings.tools) do
-      local p = mr.get_package(tool)
-      if not p:is_installed() then
-        p:install()
+    local function install_ensured()
+      for _, tool in ipairs(settings.tools) do
+        local p = mr.get_package(tool)
+        if not p:is_installed() then
+          p:install()
+        end
       end
     end
+    if mr.refresh then
+      mr.refresh(install_ensured)
+    else
+      install_ensured()
+    end
 
     -- install LSPs
     require("mason-lspconfig").setup({ ensure_installed = settings.lsp_servers })

Replace all doesn't work

Get error when I'm trying to replace all using <leader>RR

E5108: Error executing lua: ...share/nvim/lazy/nvim-spectre/lua/spectre/state_utils.lua:13: attempt to index field 'user_config' (a nil value)
stack traceback:
	...share/nvim/lazy/nvim-spectre/lua/spectre/state_utils.lua:13: in function 'get_replace_creator'
	...cal/share/nvim/lazy/nvim-spectre/lua/spectre/actions.lua:153: in function 'run_replace'
	/home/aleshka/.config/nvim/lua/core/plugins/spectre.lua:47: in function </home/aleshka/.config/nvim/lua/core/plugins/spectre.lua:46>

I'm not sure if it's an issue in current setup or problem with spectre plugin itself.
It's reproducible in image allaman/nvim.

Failed to run `config` for none-ls.nvim

Anyone else seeing this error? I've tried a few of the recent neovim nightly builds and still seeing this issue.

Failed to run `config` for none-ls.nvim

....artounian/.config/nvim/lua/core/plugins/lsp/null-ls.lua:50: attempt to index global 'null_ls' (a nil value)

# stacktrace:
  - ~/.config/nvim/lua/core/plugins/lsp/null-ls.lua:50
  - ~/.config/nvim/lua/core/plugins/none-ls.lua:7 _in_ **config**
  - ~/.config/nvim/lua/core/lazy.lua:20

start nvim and show null-ls fail run message

[null-ls] failed to run generator: ...im/lazy/none-ls.nvim/lua/null-ls/helpers/diagnostics.lua:71: index out of range

nvim config is latest

my system infomation:

Manjaro Linux x86_64
Kernel: 6.1.66-1-MANJARO
NVIM v0.9.4
Build type: Release
LuaJIT 2.1.1702233742

'telegraph' not found

hello, I used your nvim configuration file, but when I execute PackerSync and then restart nvim, the following error is report, I'm using this config on my macos.
image

Golang colorscheme

I'm using the same colorscheme (catpuccin) with the exact same config as you. My go code looks pale with minimal syntax highlighting. Can you help me resolve this?

image

Docker stuck on last step

I tried splitting the commands on the last line to narrow down the issue and it seems to be hanging on this command, nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'.

For others having issues, seems like a bug with Packer and/or neovim. I wasn't able to implement a fix into the Dockerfile, but changed the Dockerfile to be

ARG ARCH
FROM ${ARCH}debian:stable-slim

# TODO: optimize image size
# TODO: maybe build a dedicated base image with all dependencies included
# TODO: allow a specific version of Neovim to be installed

ARG TARGETOS
ARG TARGETARCH

ENV LANGUAGE=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8

# Update system and install core packages/dependencies
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install --no-install-recommends -y \
  apt-transport-https \
  autoconf \
  automake \
  ca-certificates \
  cmake \
  coreutils \
  curl \
  locales \
  doxygen \
  g++ \
  gettext \
  git \
  gnupg \
  libtool \
  libtool-bin \
  make \
  pkg-config \
  sudo \
  tar \
  unzip \
  wget \
  zip \
&& rm -rf /var/lib/apt/lists/*

# Download and build Neovim from latest source
RUN git clone https://github.com/neovim/neovim /tmp/neovim
WORKDIR /tmp/neovim
RUN make CMAKE_BUILD_TYPE=RelWithDebInfo && make install && rm -r /tmp/neovim

# Set correct locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales

# Install (global) dependencies (tools, formatters and LSPs)
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
fzf \
fd-find \
ripgrep \
python3-pip \
npm \
&& npm i -g \
prettier \
eslint \
bash-language-server \
dockerfile-language-server-nodejs \
yaml-language-server \
typescript \
typescript-language-server \
vscode-langservers-extracted \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s "$(which fdfind)" /usr/bin/fd

RUN curl -sLo go.tar.gz "https://go.dev/dl/go1.18.linux-${TARGETARCH}.tar.gz" \
&& tar -C /usr/local/bin -xzf go.tar.gz \
&& rm go.tar.gz

# Add user 'nvim' and allow passwordless sudo
RUN adduser --disabled-password --gecos '' nvim \
&& adduser nvim sudo \
&& echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

USER nvim
WORKDIR /home/nvim

# Install (user only) dependencies (formatters and LSPs)
ENV PATH=$PATH:/usr/local/bin/go/bin/:/home/nvim/.local/bin:/home/nvim/.local/bin/bin:/home/nvim/go/bin:/home/nvim/.cargo/bin
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN pip3 install --no-cache-dir --user pyright black pynvim yamllint \
&& go install golang.org/x/tools/cmd/goimports@latest \
&& go install mvdan.cc/gofumpt@latest \
&& go install golang.org/x/tools/gopls@latest \
&& curl -sLo tf-ls.zip "https://releases.hashicorp.com/terraform-ls/0.27.0/terraform-ls_0.27.0_linux_${TARGETARCH}.zip" \
&& unzip -d ~/.local/bin tf-ls.zip \
&& rm tf-ls.zip \
&& curl -sLo tf.zip "https://releases.hashicorp.com/terraform/1.2.1/terraform_1.2.1_${TARGETOS}_${TARGETARCH}.zip" \
&& unzip -d ~/.local/bin tf.zip \
# workaround for naming amd64 as x64
&& if [[ "${TARGETARCH}" == "amd64" ]]; then TARGETARCH=x64; fi \
&& echo "${TARGETARCH}" \
&& curl -sLo lua-lsp.tar.gz "https://github.com/sumneko/lua-language-server/releases/download/3.2.4/lua-language-server-3.2.4-linux-${TARGETARCH}.tar.gz" \
#FIX: extracted very much stuff besides the executable
&& tar -C ~/.local/bin/ -xzf lua-lsp.tar.gz \
&& rm lua-lsp.tar.gz \
&& rm tf.zip \
# rust runs in strange segmentation faults when building with amd64 even after increasing Docker memory limits. Stylua is only available as amd64 release
&& if [[ "${TARGETARCH}" == "arm64" ]]; then curl https://sh.rustup.rs -sSf | bash -s -- -y; cargo install stylua; rustup self uninstall -y; else \
curl -sLo stylua.zip "https://github.com/JohnnyMorganz/StyLua/releases/download/v0.13.1/stylua-linux.zip"; unzip -d ~/.local/bin stylua.zip; rm stylua.zip; fi

# Copy Neovim config into the image
RUN mkdir -p .config/nvim
COPY --chown=nvim:nvim . .config/nvim
# Bootstrap Packer
RUN git clone --depth 1 https://github.com/wbthomason/packer.nvim \
 ~/.local/share/nvim/site/pack/packer/start/packer.nvim

ENTRYPOINT ["/bin/bash", "-c", "nvim"]

(removing the last 2 subcommands inside of the last RUN)

Then started the docker container running bash, opening nvim ran :PackerInstall, quit nvim, opening nvim, ran :PackerSync, quit nvim, (should be all working now) then used another terminal window to tag & commit the docker image.

references:

By chance has anyone gotten copilot working properly with this config?

I've tried many things, but the lua versions of copilot don't work. I'm only able to get it partially working with https://github.com/hrsh7th/cmp-copilot .

I tried following putting the config directly into cmp.lua, and also tried copying the copilot file from LazyVim with some adjustments without luck
https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/extras/coding/copilot.lua put that file into a new folder lua/plugins then changed the lazy.setup to

commit of my latest attempt to get it working partounian@31984f8

require("lazy").setup({
  spec = {
  { import = "core.plugins" },
  { import = "plugins" },
  },
  -- defaults = { lazy = true },
  install = {
    -- install missing plugins on startup. This doesn't increase startup time.
    missing = true,
  },
  change_detection = {
    -- automatically check for config file changes and reload the ui
    enabled = false,
    notify = true, -- get a notification when changes are found
  },
  debug = false,
})

How to enable language server for yaml?

I get the following output even after installing ansible-language-server via mason. ansible-language-server is in my shell path.

Spawning language server with cmd: `table: 0x40149d60` failed. The language server is either not installed, missing from PATH, or not executable.
Spawning language server with cmd: `table: 0x40149d60` failed. The language server is either not installed, missing from PATH, or not executable.

How to ensure ansible-language-server is enabled by default when opening yaml files?
Ubuntu 22.04 user here.

How do you perform project wide search & replaces?

  1. Would be much appreciated to learn how you perform project wide search & replaces.
  2. Also certain actions seem to change the project/workspace(?) to a subfolder of the actual area I'd like to work in, how can I set the permanent project workspace root to the location of the .git/ folder?
  3. Bonus question, do you use anything to emphasize the active pane? I found https://github.com/jceb/blinds.nvim but it throws a segfault

(lost some of these commands when I lost my previous dotfiles)

Thank you again for this amazing repo. It has been immensely helpful for me.

Using your Dockerfile on macOs

Update:
rg foo --files-with-matches | xargs sed -i 's/foo/bar/g' (gnu)
rg foo --files-with-matches | xargs sed -i '' 's/foo/bar/g' (mac)
seems like a reasonable solution, maybe we should bring it into vim?

Using archlinux and neovim version 8.1 -> package.preload['which-key']not found in lazy cache error.

Hi @Allaman ,
Your config looked quite cool and felt like trying to use your configs as base, but I am getting error when starting neovim.

I might've set this wrong. As I copied the whole repo to my ~/.config/nvim folder if this requires some other steps..

More info of the neovim version:

NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by builduser
```
`
Error:
Error detected while processing /home/penguin/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/penguin/.config/nvim/lua/core/mappings.lua:36: module 'which-key' not found:
        no field package.preload['which-key']not found in lazy cache
        no file './which-key.lua'
        no file '/usr/share/luajit-2.1.0-beta3/which-key.lua'
        no file '/usr/local/share/lua/5.1/which-key.lua'
        no file '/usr/local/share/lua/5.1/which-key/init.lua'
        no file '/usr/share/lua/5.1/which-key.lua'
        no file '/usr/share/lua/5.1/which-key/init.lua'
        no file './which-key.so'
        no file '/usr/local/lib/lua/5.1/which-key.so'
        no file '/usr/lib/lua/5.1/which-key.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'




Any clue why it causes such error? I tried to downgrade neovim but it didn't seem to help. 

Temporarily disabling autoformatting

Does anyone happen to know the command or shortcut for temporarily disabling autoformatting? It was formatting my typescript in a way I didn't want, and didn't have time in the moment to dig too deeply into it.

While I was doing some digging earlier today, my guess is that I would need to manage these lines with a condition based on a variable?

if client.supports_method("textDocument/formatting") then
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
vim.api.nvim_create_autocmd("BufWritePre", {
group = augroup,
buffer = bufnr,
callback = function()
vim.lsp.buf.format({ bufnr = bufnr })
end,
})
end

dap with go issues (doesn't seem to actually attach to the process?)

Does it work for you?

It doesn't seem to actually attach to the process, but I'm able to attach to it in GoLand, so that's leading me to believe it could be something with the nvim config. Also, if it does connect how would I use/navigate to the icons like the pause, play, step over etc. I tried looking for the docs but couldn't find clear info on the dap-ui.

Thanks again!

Neotree not loading. Go files not triggering code section

Hi it's me again.
With a clean install Neotree doesn't open by default. After :PackerLoad neo-tree.git it works.
Second: When editing a go file, the lsp doesnt seem to work. coding section after pressing leader key is not available.
When opening a go file I get the following warning: "gopls not found", "Setup called twice"

I tried to figure out where the setup is called a second but wasn't successful

Migrate to mason.nvim

Before, one must ensure that required tools like LSPs, formatters, etc. are installed on the system. With this rework mason.nvim installs all required tools for you.

In order to migrate you should ...

  • ensure that your system satisfies mason.nvim requirements
  • ensure that all required languages/tool chains are available
  • delete your formerly installed LSPs, linters, etc
  • add the newly installed tools to your path (default is ~/.local/share/nvim/mason/bin)

winshift is missing

Can remove or replace the commands. Guessing you use the built-in ctrl-w for moving windows around?

Trying to figure out a way to bootstrap packer in `dockerfile`

Hi! I am trying to containerizing my config just as yours, and your dockerfile gives me a lot of help! Thanks for sharing your dockerfile!

The last thing I am missing is: I want to bootstrap my packer and download nvim plugins within dockerfile,
however I find that running --headless will make nvim stuck and never quit, so the dockerfile cannot finish to build. So I can't bootstrap packer and download plugins in the dockerfile.

RUN nvim --headless

Bootstrapping in dockerfile is important because that in some servers with strict network limitation where github isn't viable, I don't want to start an image that isn't completely set to work.

null-ls.lua:27: attempt to call field 'format' (a nil value)

Hello,

First off, excuse me if this is something I've just missed or did wrong as I'm new to Neovim and totally new to a Lua based config.

When I save a file, I'm getting the following error:
Error detected while processing BufWritePre Autocommands for "<buffer=4>":
Error executing lua callback: /Users/angelo/.config/nvim/lua/config/null-ls.lua:27: attempt to call field 'format' (a nil value)
stack traceback:
"alacritty.yml" 893L, 31333B written

It does save the changes, but I'm not quite clear what that error means. I'm on macOS (M1) with Neovim 0.7.2. Is the fact that I'm not on 0.8 the cause of this error or did I something wrong/miss something?

Thank you in advance!


With regards,

Angelo Machils

E5108: Error executing lua Vim:E117: Unknown function: vsnip#available

Hi.. I'm just a hobby nerd so excuse my dumbness..
I copied mostly everything you did and only have a bit customized..
I get this error whenever I'm in pum and press enter on any of the subjects..
Since I'm not a dev by any means I don't know how to troubleshoot here..
Care to help a lost guy?
If it helps I made a snapshot in a repo..
Edit: I also get this error when I just press TAB in an empty line in insert mode..

E5108: Error executing lua Vim:E117: Unknown function: vsnip#available
stack traceback:
        [C]: in function 'vsnip#available'
        /home/frost/.config/nvim/lua/plugin-configs/cmp.lua:83: in function 'on_keymap'
        ...re/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/core.lua:142: in function 'callback'
        ...site/pack/packer/start/nvim-cmp/lua/cmp/utils/keymap.lua:101: in function <...site/pack/packer/start/nvim-cmp/lua/cmp/utils/keymap.lua:96>
        ...site/pack/packer/start/nvim-cmp/lua/cmp/utils/keymap.lua:252: in function <...site/pack/packer/start/nvim-cmp/lua/cmp/utils/keymap.lua:251>

Can't select LSP

Hi,

Sorry in advance if this is a bit of a newbie question.

image

I can't seem to use any method of switching windows that I know of to select an LSP here. How do you do it?

Thanks

broken after install.sh script

when i start nvim i will get (also when calling :PackerSync)

Error executing lua callback: /home/matthiass/.config/nvim/lua/functions.lua:110: module 'nvim-navic' not found:
        no field package.preload['nvim-navic']
        no file './nvim-navic.lua'
        no file '/home/linuxbrew/.linuxbrew/share/luajit-2.1.0-beta3/nvim-navic.lua'
        no file '/usr/local/share/lua/5.1/nvim-navic.lua'
        no file '/usr/local/share/lua/5.1/nvim-navic/init.lua'
        no file '/home/linuxbrew/.linuxbrew/share/lua/5.1/nvim-navic.lua'
        no file '/home/linuxbrew/.linuxbrew/share/lua/5.1/nvim-navic/init.lua'
        no file './nvim-navic.so'
        no file '/usr/local/lib/lua/5.1/nvim-navic.so'
        no file '/home/linuxbrew/.linuxbrew/lib/lua/5.1/nvim-navic.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        /home/matthiass/.config/nvim/lua/functions.lua:110: in function 'show_winbar'
        /home/matthiass/.config/nvim/lua/autocmd.lua:92: in function </home/matthiass/.config/nvim/lua/autocmd.lua:90>

Config issues in fresh install

Using Ubuntu 22.04
NVIM v0.10.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

Getting the following error when trying to open go file.

``` Failed to run config for none-ls.nvim

/home/userj/.config/nvim/lua/core/plugins/lsp/none-ls.lua:15: attempt to index field 'latexindent' (a nil value)

stacktrace:

  • ~/.config/nvim/lua/core/plugins/lsp/none-ls.lua:15
  • ~/.config/nvim/lua/core/plugins/none-ls.lua:8 in config

Error msg when starting nvim

I see this at startup of nvim.

[mason-lspconfig.nvim] failed to install nil_ls. Installation logs are available in :Mason and :MasonLog

When I go :MasonLog I see

[INFO  Sun 23 Jul 2023 02:01:23 AM EDT] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:184: Executing installer for Package(name=nil) {}
[ERROR Sun 23 Jul 2023 02:01:38 AM EDT] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=nil) error=spawn: cargo failed with exit code 101 and signal 0. 

Running nvim on Ubuntu 22.04

nvim --version
NVIM v0.10.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Run "nvim -V1 -v" for more info

Error when trying to delete a file

When I try to delete a file using file explorer <leader>fp, the following error appears

E5108: Error executing lua: Vim:E475: Invalid value for argument cmd: 'trash' is not executable
stack traceback:
        [C]: in function 'system'
        .../guilhermerigotti/.config/nvim/lua/config/ui/neotree.lua:260: in function 'func'
        ...ck/packer/opt/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:746: in function <...ck/packer/opt/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:744>

image

Neogit not working after fresh clone of repo

After a pull today Neogit isn't working anymore.
I get "Not an editor command: Neogit"
I tried to manually load it in Packer but with no success.
Does anyone have any ideas what's going on?
Other git features work.
PackerStatus shows neogit as an installed plugin

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.