diff --git a/.gitignore b/.gitignore index 5a4285f..848faab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.json -*.toml \ No newline at end of file +*.toml +baremetal \ No newline at end of file diff --git a/README.md b/README.md index 37aa20f..6948d61 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,17 @@ -# nvimconfig +# NvimConfig -Configuration of Neovim \ No newline at end of file +## Configuration for VSCode-Neovim +### `` + +|L1 |L2 |L3 |Function | +|--- |--- |--- |--- | +|`` |b |- | Toggle Side Bar Visibility| +|`` |B |- | Toggle Side Bar Position | +|`` |l |- | Toggle Line Number Mode | +|`` |z |- | Toggle Zen Mode | +|`` |/ |- | Toggle Flash.nvim Search | +|c (code) |f |- | Format Code | +|c |t |- | Flash.nvim Treesitter | +|b (side bar) |e |- | Open Explorer | +|s (search) | +|t (tab) |n |- | Next Tab | +|w (window) | | \ No newline at end of file diff --git a/init.lua b/init.lua index 15e26e8..536b1f7 100644 --- a/init.lua +++ b/init.lua @@ -3,5 +3,21 @@ if vim.g.vscode then require('config.lazyvscode') else - require("config.lazy") + local info = debug.getinfo(1, "S") + local path_info = info.source:sub(2) + local path + if vim.loop.os_uname().sysname == "Windows_NT" then + -- Windows platform (backslashes or forward slashes) + path = path_info:match("(.*[/\\])") + else + -- Linux/macOS platform (forward slashes only) + path = path_info:match("(.*/)") + end + local file, err = io.open(string.format("%s%s", path, "/baremetal"), "r") + if file then + file:close() + require("config.lazybaremetal") + else + require("config.lazynvimide") + end end diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua deleted file mode 100644 index 0bb73b4..0000000 --- a/lua/config/lazy.lua +++ /dev/null @@ -1,114 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - -if true then - require("lazy").setup({ - spec = { - -- add LazyVim and import its plugins - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- import/override with your plugins - { import = "lazyvim" }, - }, - defaults = { - -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. - -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. - lazy = false, - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = false, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - }, - install = { colorscheme = { "tokyonight", "habamax" } }, - checker = { - enabled = true, -- check for plugin updates periodically - notify = false, -- notify on update - }, -- automatically check for plugin updates - performance = { - rtp = { - -- disable some rtp plugins - disabled_plugins = { - "gzip", - -- "matchit", - -- "matchparen", - -- "netrwPlugin", - "tarPlugin", - "tohtml", - "tutor", - "zipPlugin", - }, - }, - }, - }) -else - -- 1.options - -- Hint: use `:h