converted from packer to lazy
This commit is contained in:
parent
8c70ffcc1f
commit
7b6c664ceb
14 changed files with 137 additions and 96 deletions
17
.config/nvim/lua/config/keymaps.lua
Normal file
17
.config/nvim/lua/config/keymaps.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
vim.g.mapleader = ' ' -- set <SPACE> as leader key
|
||||
|
||||
vim.keymap.set('n', '<leader>w', '<cmd>write<cr>') -- write file with leader w
|
||||
vim.keymap.set('n', '<leader>e', '<cmd>NvimTreeToggle<cr>') -- open file explorer with leader e
|
||||
|
||||
-- set split navigation to cntrl+j/k/h/l
|
||||
vim.keymap.set('n', '<C-j>', '<C-w>j')
|
||||
vim.keymap.set('n', '<C-k>', '<C-w>k')
|
||||
vim.keymap.set('n', '<C-h>', '<C-w>h')
|
||||
vim.keymap.set('n', '<C-l>', '<C-w>l')
|
||||
|
||||
-- telescope keymaps
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
35
.config/nvim/lua/config/lazy.lua
Normal file
35
.config/nvim/lua/config/lazy.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
-- 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)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = "\\"
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { "habamax" } },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true },
|
||||
})
|
24
.config/nvim/lua/config/options.lua
Normal file
24
.config/nvim/lua/config/options.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
vim.g.loaded_netrw = 1 -- disable netrw for nvim-tree
|
||||
vim.g.loaded_netrwPlugin = 1 -- recommended for nvim-tree
|
||||
vim.opt.number = true -- turn line numbers on
|
||||
vim.opt.ignorecase = true -- ignore case when searching
|
||||
vim.opt.hlsearch = true -- highlight search results
|
||||
vim.opt.tabstop = 2 -- set number of spaces for a tab
|
||||
vim.opt.shiftwidth = 2 -- number of spaces a tab will be expanded to
|
||||
vim.opt.expandtab = true -- enable expanding tabs to spaces
|
||||
vim.opt.wrap = true -- softwrap long lines in view
|
||||
vim.opt.breakindent = true -- indent wrapped lines
|
||||
vim.opt.cursorline = true -- underline current line
|
||||
vim.opt.cursorlineopt = "screenline" -- hightlight line only
|
||||
vim.opt.termguicolors = true -- enables 24-bit color
|
||||
vim.opt.splitbelow = true -- new horizontal splits go below
|
||||
vim.opt.splitright = true -- new vertical splits go right
|
||||
vim.opt.background = "dark"
|
||||
|
||||
-- nord theme options
|
||||
vim.g.nord_contrast = true
|
||||
vim.g.nord_borders = true
|
||||
vim.g.nord_disable_background = true
|
||||
vim.g.nord_italic = false
|
||||
vim.g.nord_uniform_diff_background = true
|
||||
vim.g.nord_bold = false
|
Loading…
Add table
Add a link
Reference in a new issue