Giter Club home page Giter Club logo

astrolsp's Introduction

AstroNvim



AstroNvim is an aesthetically pleasing and feature-rich neovim config that is extensible and easy to use with a great set of plugins

🌟 Preview

Preview Image

✨ Features

⚡ Requirements

Note

[1] All downloadable Nerd Fonts contain icons which are used by AstroNvim. Install the Nerd Font of your choice to your system and in your terminal emulator settings, set its font face to that Nerd Font. If you are using AstroNvim on a remote system via SSH, you do not need to install the font on the remote system.

Note

[2] Note when using default theme: For MacOS, the default terminal does not have true color support. You will need to use iTerm2, Kitty, WezTerm, or another terminal emulator that has true color support.

🛠️ Installation

AstroNvim is provided as a plugin that can be installed with the lazy.nvim plugin manager and then used to import all of the plugin configurations that AstroNvim provides. To quickly get started it is recommended to start with the official AstroNvim Template which provides a great starting point for a new AstroNvim based configuration.

Linux/Mac OS (Unix)

Make a backup of your current nvim and shared folder

mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak
mv ~/.cache/nvim ~/.cache/nvim.bak

Clone the template repository

git clone --depth 1 https://github.com/AstroNvim/template ~/.config/nvim
rm -rf ~/.config/nvim/.git
nvim

Windows (Powershell)

Make a backup of your current nvim and nvim-data folder

Rename-Item -Path $env:LOCALAPPDATA\nvim -NewName $env:LOCALAPPDATA\nvim.bak
Rename-Item -Path $env:LOCALAPPDATA\nvim-data -NewName $env:LOCALAPPDATA\nvim-data.bak

Clone the repository

git clone --depth 1 https://github.com/AstroNvim/template $env:LOCALAPPDATA\nvim
Remove-Item $env:LOCALAPPDATA\nvim\.git -Recurse -Force
nvim

Minimal ~/.config/nvim/init.lua

Some user's might not want to use an entire template or do any customization. Here is a minimal ~/.config/nvim/init.lua file that simply set's up a base AstroNvim installation:

local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
  -- stylua: ignore
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup { "AstroNvim/AstroNvim", version = "^4", import = "astronvim.plugins" }

📦 Basic Setup

Install LSP

Enter :LspInstall followed by the name of the server you want to install
Example: :LspInstall pyright

Install language parser

Enter :TSInstall followed by the name of the language you want to install
Example: :TSInstall python

Install Debugger

Enter :DapInstall followed by the name of the debugger you want to install
Example: :DapInstall python

Manage plugins

Run :Lazy check to check for plugin updates

Run :Lazy update to apply any pending plugin updates

Run :Lazy clean to remove any disabled or unused plugins

Run :Lazy sync to update and clean plugins

Update AstroNvim Packages

Run :AstroUpdate (<leader>pa) to update both Neovim plugins and Mason packages

🗒️ Links

📹 Videos

There have been some great review videos released by members of the community! Here are a few:

🚀 Contributing

If you plan to contribute, please check the contribution guidelines first.

⭐ Credits

Sincere appreciation to the following repositories, plugin authors and the entire neovim community out there that made the development of AstroNvim possible.

Lua

astrolsp's People

Contributors

astronvimbot avatar bigduu avatar github-actions[bot] avatar mehalter 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

Watchers

 avatar

astrolsp's Issues

Unable to map insert-mode <C-s>

Checklist

  • I have searched through the AstroNvim docs
  • I have searched through the existing issues of AstroNvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.9

Operating system/version

macOS

Terminal/GUI

warp

Describe the bug

I use CTRL-s for saving while in insert-mode.
This is not possible using AstroLSP since it seems to reserve the shortcut for itself and cannot be overriden.

I am not completely sure how it works, and the only time the key works is when AstroLSP is removed from the plugin list.

Steps to Reproduce

  • Use the AstroNvim template, add mapping.lua with insert-mode for bound to a command. This does not work.
  • Remove AstroLSP as a plugin and restart. Now the shortcut works

Expected behavior

Command executes when combination is pressed in insert-mode.

Screenshots

No response

Additional Context

No response

Error when processing autocommnd "*" of LSPProgress

Checklist

  • I have searched through the AstroNvim docs
  • I have searched through the existing issues of AstroNvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.10.0-dev-3097+g064f3e42e8

Operating system/version

manjaro 5.5.13

Terminal/GUI

kitty

Describe the bug

Error executing lua callback: ...zh/.local/share/nvim/lazy/astrolsp/lua/astrolsp/init.lua:38: attempt to index field 'result' (a nil value)
stack traceback:
	...zh/.local/share/nvim/lazy/astrolsp/lua/astrolsp/init.lua:38: in function 'progress'
	...zh/.local/share/nvim/lazy/astrolsp/lua/astrolsp/init.lua:251: in function <...zh/.local/share/nvim/lazy/astrolsp/lua/astrolsp/init.lua:251>
	[C]: in function 'nvim_exec_autocmds'
	/usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:53: in function 'handler'
	...ocal/share/nvim/lazy/null-ls.nvim/lua/null-ls/client.lua:233: in function <...ocal/share/nvim/lazy/null-ls.nvim/lua/null-ls/client.lua:232>
Error executing lua callback: ...al/share/nvim/lazy/noice.nvim/lua/noice/lsp/progress.lua:20: attempt to index local 'result' (a nil value)
stack traceback:
	...al/share/nvim/lazy/noice.nvim/lua/noice/lsp/progress.lua:20: in function 'progress'
	...al/share/nvim/lazy/noice.nvim/lua/noice/lsp/progress.lua:95: in function <...al/share/nvim/lazy/noice.nvim/lua/noice/lsp/progress.lua:94>
	[C]: in function 'nvim_exec_autocmds'
	/usr/share/nvim/runtime/lua/vim/lsp/handlers.lua:53: in function 'handler'
	...ocal/share/nvim/lazy/null-ls.nvim/lua/null-ls/client.lua:233: in function <...ocal/share/nvim/lazy/null-ls.nvim/lua/null-ls/client.lua:232

Steps to Reproduce

Maybe update to nvim 0.10.0 will reproduce this.

Expected behavior

Just no error

Screenshots

240509_14h55m32s_screenshot

Additional Context

No response

The "Diagnostic next" and "Diagnostic previous" mappings disappeared in v4

Checklist

  • I have searched through the AstroNvim docs
  • I have searched through the existing issues of AstroNvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.10.0-dev-2128+g78b000c74-Homebrew

Operating system/version

MacOS 14.4.1 (23E224)

Terminal/GUI

Warp terminal

Describe the bug

In the LSP mappings, there are "diagnostic next" and "diagnostic previous" mapped to ]d and [d by default. However, they do not exist in my setup. I looked in which-key, and in telescope using <leader>fk. No sign of them.

Steps to Reproduce

Try [d or ]d in a file with LSP set up and having some diagnostic errors.

Expected behavior

The [d and ]d bindings should be defined by default as they appear in the docs.

Screenshots

No response

Additional Context

These worked in astronvim v3 and I use them heavily.

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.