Skip to content

iUnstable0/nvim-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvim-config

My neovim configuration. (Not finished)

Installation

Make sure you delete or move your old neovim configuration to somewhere safe before installing this one.

Linux & MacOS

git clone https://github.com/iUnstable0/nvim-config.git ~/.config/nvim

Windows

git clone https://github.com/iUnstable0/nvim-config.git $env:LOCALAPPDATA\nvim

Extra

If you only want to use my custom module, copy the lua/modules folder to your neovim configuration folder.

Usage

local core = require("modules.core")

-- Debugger module
local debugger = core.load_module("debugger")

-- String module
local string = core.load_module("string")
-- Table module
local table = core.load_module("table")
-- Utils module (Empty as of now)
local utils = core.load_module("utils")

Debugger Module

local a = {
    "Hello",
    "World"
}

debugger.log(a) -- Beautifully prints the array/dictionary

String Module

local splitted = string.split("Hello World", " ") -- Returns a table { "Hello", "World" }

local joined = splitted:concat(".") -- Returns a string "Hello.World"
local popped = splitted:pop() -- Returns popped table { "Hello" }

local random = string.randomstr(10) -- Returns a random string with length of 10

Table Module

local a = {
    "Hello",
    "World",
    "Hi"
}

local popped = table.pop(a) -- Returns popped table { "Hello", "World" }
local joined = popped:concat(" ") -- Returns a string "Hello World"

-- More examples

local poop = table.concat(a, " ") -- Returns a string "Hello World Hi"
local splitted = poop:split(" ") -- Returns a table { "Hello", "World", "Hi" }
local roblox = splitted:pop() -- Returns popped table { "Hello", "World" }
local robux = roblox:concat(" ") -- Returns a string "Hello World"

-- Equivalent to

local minecraft = table.concat(a, " "):split(" "):pop():concat(" ") -- Returns a string "Hello World"
local a = {
    hello = "Hello",
    hi = "World"
}

local is_dictionary = table.is_dictionary(a) -- Returns true
local count = table.count_keys(a) -- Returns 2

local b = {
  name = "John",
  age = 20
}

debugger.log(
  table.merge(a, b)
) -- Returns { hello = "Hello", hi = "World", name = "John", age = 20 }

-- Idk why you would do this but you can merge a dictionary with a table
-- I also dk why this is a thing but it is
-- No idea why it works too

local c = {
  "Lol",
  "Lmao"
}

local poop = table.pop(c) -- Returns popped table { "Lol" }

debugger.log(
  poop:merge(b) -- Never really tested this but it SHOULD work
) -- Returns { 1 = "Lol", name = "John", age = 20 }

About

My full neovim configuration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages