diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/config/init.lua | 3 | ||||
| -rw-r--r-- | lua/config/lazy.lua | 45 | ||||
| -rw-r--r-- | lua/config/pack.lua | 5 | ||||
| -rw-r--r-- | lua/config/settings.lua | 5 | ||||
| -rw-r--r-- | lua/plugins/colorscheme.lua | 14 | ||||
| -rw-r--r-- | lua/plugins/init.lua | 1 | ||||
| -rw-r--r-- | lua/plugins/lsp.lua | 12 | ||||
| -rw-r--r-- | lua/plugins/treesitter.lua | 37 |
8 files changed, 31 insertions, 91 deletions
diff --git a/lua/config/init.lua b/lua/config/init.lua new file mode 100644 index 0000000..33773ad --- /dev/null +++ b/lua/config/init.lua @@ -0,0 +1,3 @@ +require('config.settings') +require('config.keybindings') +require('config.pack') diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua deleted file mode 100644 index b5bab23..0000000 --- a/lua/config/lazy.lua +++ /dev/null @@ -1,45 +0,0 @@ --- Bootstrap lazy.nvim -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) - ---setup lazy.nvim -require("lazy").setup({ - spec = { - -- import plugins from specific directory - { import = "plugins" }, - }, - -- setup correct colorscheme - install = { colorscheme = { "gruvbox"} }, - -- automatically check for plugin updates - checker = { enabled = true }, - rocks = { - enabled = false - }, - performance = { - rtp = { - disabled_plugins = { - "gzip", - "matchit", - "matchparen", - "netrwPlugin", - "tarPlugin", - "tohtml", - "tutor", - "zipPlugin", - }, - }, - }, -}) diff --git a/lua/config/pack.lua b/lua/config/pack.lua new file mode 100644 index 0000000..a24bd02 --- /dev/null +++ b/lua/config/pack.lua @@ -0,0 +1,5 @@ +vim.pack.add({ + {src = "https://github.com/ellisonleao/gruvbox.nvim"}, + {src = "https://github.com/nvim-treesitter/nvim-treesitter"}, + {src = "https://github.com/neovim/nvim-lspconfig"}, +}) diff --git a/lua/config/settings.lua b/lua/config/settings.lua index 50c5be3..3fdff37 100644 --- a/lua/config/settings.lua +++ b/lua/config/settings.lua @@ -26,6 +26,5 @@ vim.opt.inccommand = "split" -- ignore case vim.opt.ignorecase = true --- setup leader and local leader -vim.g.mapleader = " " -vim.g.maplocalleader = ";" +-- disable neovim swap files +vim.opt.swapfile = false diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua index 696deb4..f82912a 100644 --- a/lua/plugins/colorscheme.lua +++ b/lua/plugins/colorscheme.lua @@ -1,12 +1,2 @@ -return { - { - "ellisonleao/gruvbox.nvim", - lazy = false, - priority = 1000, - config = function() - -- load colorscheme here - vim.o.background = "dark" - vim.cmd([[colorscheme gruvbox]]) - end, - }, -} +vim.o.background = "dark" +vim.cmd([[colorscheme gruvbox]]) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua new file mode 100644 index 0000000..cb496ab --- /dev/null +++ b/lua/plugins/init.lua @@ -0,0 +1 @@ +require("plugins.colorscheme") diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index aa96f78..22ce210 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,9 +1,3 @@ -return { - { - "neovim/nvim-lspconfig", - config = function() - - vim.lsp.enable("nixd") - end, - }, -} +vim.lsp.enable( + "nixd" +) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index e51ef9b..e9d94e8 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,26 +1,19 @@ -return { - { - "nvim-treesitter/nvim-treesitter", - config = function() - require("nvim-treesitter.configs").setup({ - ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "go", "nix" }, +require("nvim-treesitter.configs").setup({ + ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "go", "nix" }, - auto_install = true, + auto_install = true, - highlight = { - enable = true, - }, + highlight = { + enable = true, + }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "<Leader>ss", - node_incremental = "<Leader>si", - scope_incremental = "<Leader>sc", - node_decremental = "<Leader>sd", - }, - }, - }) - end, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "<Leader>ss", + node_incremental = "<Leader>si", + scope_incremental = "<Leader>sc", + node_decremental = "<Leader>sd", + }, }, -} +}) |
