Code Monkey home page Code Monkey logo

nvim-godot's Introduction

↖️ Table of Contents

Neovim logo Godot logo

nvim-godot

Use Neovim as your Godot code editor

✨ Features

  • ❓ A step-by-step guide on how to setup a dev environment in Neovim to work seamlessly with Godot
  • 🔋 A good looking minimal Neovim config with IDE-like features
  • 🏃 An executable file to allow Godot to open files directly into Neovim
  • 🐋 A Docker Image packed with the Minimal Neovim Config for a quick setup

⚡ Getting Started

  1. 🛠️ Installation and Setup
  2. 🏃 The run.sh File
  3. 🤖 Godot External Editor Settings

🛠️ Installation and Setup

To be able to leverage the power of the Neovim-Godot integration, you can follow one of these paths:

🐋 Docker

To get up and running quickly, or to test the setup, you can just run the following command if you have Docker installed:

docker run -it -p 6005:6005 -p 6006:6006 niscolas/nvim-godot:latest

💡 One important thing to note is that the some error messages will appear on Neovim startup related to the Lua Language Server since it doesn't support Alpine (the base image)

➕ Additional Info

💡 You can add the --rm option to remove the container as soon as you're finished with testing

docker run --rm -it -p 6005:6005 -p 6006:6006 niscolas/nvim-godot:latest

⚠️ And you can add the --network host option to be able to use the host machine (your PC probably) network (I normally have to use it since I broke my Docker settings), but it's advised against

docker run --network host -it niscolas/nvim-godot:latest

⬇️ Using the Minimal Neovim Config in your machine

  • Can be done by cloning the repo and moving the nvim_config/ directory to your $HOME/.config/nvim

OR

  • With this simple script:

    ⚠️ Your current Neovim config will be moved to $HOME/.config/nvim.old, make sure that it's already in you Version Control system or that you know what you're doing)

    mv $HOME/.config/nvim $HOME/.config/nvim.old && \
    git clone https://github.com/niscolas/nvim-godot && \
    mv nvim-godot/nvim_config $HOME/.config/nvim
    

🏃 The run.sh File

The run.sh is an executable bash file responsible for opening your terminal and launching Neovim with the correct file (line and column) opened.

You may need to edit it to fit your needs, the places where changes maybe be needed are commented in the file itself.

🤖 Godot External Editor Settings

  1. In Godot, go to Editor > Editor Settings... > (General Tab) > Text Editor > External
  2. Set Use External Editor to ✅
  3. Set Exec Path to the location of the run.sh file on your system
  4. Set Exec Flags to "{file}" "{line},{col}"
Step-by-Step with Images

⚙️ The Neovim Config

👉 Introduction

⚠️ In order for the LSP features to work, you need a running instance of Godot 4

Out of the box you should have:

  • ➡️ Autocompletion (integrated with LSP and Snippets)
  • 🧠 General LSP features, just like in Godot's built-in Editor:
    • 🌐 Go to Definition
    • 🚦 Linting
  • 🌸 A nice looking theme (with GDScript highlighting)

🌸 aesthetics

This is the default look of the custom Neovim Config included in this repo: (🌲 everforest theme)

💡 Screenshots taken from the Neovim instance running on the Docker container!

Extra screenshots

📦 Settings and Plugins

Most of the Neovim config was copied from nvim-lua/kickstart.nvim, with the theme change and the Godot specific LSP, TreeSitter and DAP settings

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.