summaryrefslogtreecommitdiff
path: root/lua/core
diff options
context:
space:
mode:
authorngharo <root@ngha.ro>2023-12-29 17:46:10 -0600
committerngharo <root@ngha.ro>2023-12-29 17:46:10 -0600
commit31474998d6935d48f678988c8a7a4fac7bb2ae72 (patch)
treec71114c23c31f888c0be1ec1b2efdab0d5ce6ca5 /lua/core
downloadnvim-31474998d6935d48f678988c8a7a4fac7bb2ae72.tar.xz
nvim-31474998d6935d48f678988c8a7a4fac7bb2ae72.zip
Inititial commit
Diffstat (limited to 'lua/core')
-rw-r--r--lua/core/mappings.lua2
-rw-r--r--lua/core/options.lua19
-rw-r--r--lua/core/plugins.lua59
3 files changed, 80 insertions, 0 deletions
diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua
new file mode 100644
index 0000000..3640341
--- /dev/null
+++ b/lua/core/mappings.lua
@@ -0,0 +1,2 @@
+vim.g.mapleader = " " -- easy to reach leader key
+vim.keymap.set("n", "-", vim.cmd.Ex) -- need nvim 0.8+
diff --git a/lua/core/options.lua b/lua/core/options.lua
new file mode 100644
index 0000000..110c46a
--- /dev/null
+++ b/lua/core/options.lua
@@ -0,0 +1,19 @@
+vim.opt.tabstop = 2
+vim.opt.shiftwidth = 2
+vim.opt.shiftround = true -- round indent to sw compatible
+vim.opt.expandtab = true
+
+vim.opt.mouse = 'a'
+vim.opt.clipboard = 'unnamedplus'
+-- Case insensitive searching UNLESS /C or capital in search
+vim.opt.ignorecase = true
+vim.opt.smartcase = true
+
+-- Better editor UI
+vim.opt.number = true
+-- vim.opt.numberwidth = 3
+vim.opt.relativenumber = true
+-- vim.opt.signcolumn = 'yes:2'
+vim.opt.signcolumn = 'yes'
+vim.opt.cursorline = false
+vim.opt.listchars = 'trail:·,nbsp:◇,tab:→ ,extends:▸,precedes:◂,eol:⁋'
diff --git a/lua/core/plugins.lua b/lua/core/plugins.lua
new file mode 100644
index 0000000..7d8c3c1
--- /dev/null
+++ b/lua/core/plugins.lua
@@ -0,0 +1,59 @@
+local ensure_packer = function()
+ local fn = vim.fn
+ local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
+ if fn.empty(fn.glob(install_path)) > 0 then
+ fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
+ vim.cmd [[packadd packer.nvim]]
+ return true
+ end
+ return false
+end
+
+local packer_bootstrap = ensure_packer()
+
+return require('packer').startup(function(use)
+ use 'wbthomason/packer.nvim'
+
+ -- Telescope and deps
+ use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
+ use 'nvim-telescope/telescope-symbols.nvim'
+ use {
+ 'nvim-telescope/telescope.nvim', tag = '0.1.5',
+ requires = { {'nvim-lua/plenary.nvim'} }
+ }
+
+ -- color scheme
+ use({ 'rose-pine/neovim', as = 'rose-pine' })
+
+ -- visual undo
+ use 'mbbill/undotree'
+
+ -- lsp
+ use {
+ 'VonHeikemen/lsp-zero.nvim',
+ branch = 'v3.x',
+ requires = {
+ --- Uncomment these if you want to manage LSP servers from neovim
+ -- {'williamboman/mason.nvim'},
+ -- {'williamboman/mason-lspconfig.nvim'},
+
+ -- LSP Support
+ {'neovim/nvim-lspconfig'},
+ -- Autocompletion
+ {'hrsh7th/nvim-cmp'},
+ {'hrsh7th/cmp-nvim-lsp'},
+ {'L3MON4D3/LuaSnip'},
+ }
+ }
+
+ use {
+ 'nvim-lualine/lualine.nvim',
+ requires = { 'nvim-tree/nvim-web-devicons', opt = true }
+ }
+
+ -- Automatically set up your configuration after cloning packer.nvim
+ -- Put this at the end after all plugins
+ if packer_bootstrap then
+ require('packer').sync()
+ end
+end)