Coder Social home page Coder Social logo

nvim's Introduction

nvim

Just nvim. It is an simple and extensible neovim config with awesome community plugins.

๐ŸŽจ Screenshots

dashboard windows whichkey
telescope nvim-cmp lsp-reference

๐Ÿ”ง Requirments

Note the screenshots used JetBrainsMono Nerd Font.

๐Ÿš€ Installation

git clone https://github.com/jaeheonji/nvim $HOME/.config/nvim && nvim

โœจ Features

A list of all plugins can be found here.

๐Ÿ“ Configuration

One of the goals of this project is to provide users with a extensible user configuration. And the user configuration should be easy to understand and simple.

First, To set up a user configuration, copy the default config to custom.lua.

cp ~/.config/nvim/lua/core/config.lua ~/.config/nvim/lua/custom.lua

Please check the file name and path. Currently, only one path is supported.

The user configuration provides five components:

  • colorscheme
  • options
  • key_bindings
  • plugins
  • hooks

colorscheme

The colorscheme currently only provides catppuccin/nvim. Instead, you can set up transparency through the transparency option. This options is false by default.

options

You can set options for neovim. If you want to turn off the default options and set a new value, you can do the following.

options = {
    enable_default = false, -- disable default options

    setup = function()
        vim.opt.number = true
        vim.opt.relativenumber = false
        ...
    end,
}

key_bindings

Same as options. Note that this project basically supports which-key, so you can use which-key to key-binding as follows.

options = {
    enable_default = true,

    setup = function()
        local default_opts = { noremap = true, silent = true }
        local map = vim.keymap.set

        -- bind with vim.keymap.set function
        map({ "n", "v" }, "<C-c>", '"+y', default_opts)
        map({ "n" }, "<C-v>", '"+p', default_opts)


        -- using which-key
        local ok, wkey = pcall(require, "which-key")
        if not ok then
            return
        end

        wkey.register({ ... })
    end,
}

plugins

The plugins are one of the most important components of user configuration. The plugins provides two options. The first is to add a new plugin and the rest is to override the settings for the plugin provided by this project.

Add new plugins

plugins = {
    custom = {
        {
            -- I love Rust :)
            "simrat39/rust-tools.nvim"
            ft = { "rust "},
            config = function()
                require("rust-tools").setup({ ... })
            end
        }
    }
    ...
}

Override settings

Override settings uses the same table as each plugin settings by default. But, for null-ls and lspconfig settings, use custom settings for convenience. The following is an example.

plugins = {
    override = {
        ["lspconfig"] = {
            servers = {
                sumneko_lua = { on_attch = function() ... end },
                gopls = {},
                golangci_lint_ls = {},
            }
        },
        ["null-ls"] = {
            source = {
                "code_actions.gitsigns",
                "formatting.stylua",
            }
        }
    }
}

For more user configuration examples, check out my configuration.

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.