Added nvim config(wip)
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
local opt = vim.opt -- for conciseness
|
||||||
|
|
||||||
|
-- line numbers
|
||||||
|
opt.number = true
|
||||||
|
opt.relativenumber = true
|
||||||
|
|
||||||
|
-- tabs & indentation
|
||||||
|
opt.tabstop = 4
|
||||||
|
opt.shiftwidth = 4
|
||||||
|
opt.expandtab = true
|
||||||
|
opt.autoindent = true
|
||||||
|
|
||||||
|
-- line wrapping
|
||||||
|
opt.wrap = false
|
||||||
|
|
||||||
|
-- search settings
|
||||||
|
opt.ignorecase = true
|
||||||
|
opt.smartcase = true
|
||||||
|
|
||||||
|
-- cursor line
|
||||||
|
opt.cursorline = true
|
||||||
|
|
||||||
|
-- appearance
|
||||||
|
opt.termguicolors = true
|
||||||
|
opt.background = "dark"
|
||||||
|
opt.signcolumn = "yes"
|
||||||
|
|
||||||
|
-- backspace
|
||||||
|
opt.backspace = "indent,eol,start"
|
||||||
|
|
||||||
|
-- split windows
|
||||||
|
opt.splitright = true
|
||||||
|
opt.splitbelow = true
|
||||||
|
|
||||||
|
opt.iskeyword:append("-")
|
||||||
|
|
||||||
|
require('plugins')
|
||||||
|
require('p-tree')
|
||||||
|
require('colorscheme')
|
||||||
|
require('keymaps')
|
||||||
|
require('bar')
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
local status, lualine = pcall(require, "lualine")
|
||||||
|
if not status then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
lualine.setup({
|
||||||
|
options = {
|
||||||
|
theme = 'solarized_dark'
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
vim.cmd.colorscheme "catppuccin-frappe"
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
|
local keymap = vim.keymap -- for conciseness
|
||||||
|
|
||||||
|
-- general keymaps
|
||||||
|
keymap.set("n","<leader>to",":tabnew<CR>") -- open new tab
|
||||||
|
keymap.set("n","<leader>tx",":tabclose<CR>") -- close current tab
|
||||||
|
keymap.set("n","<leader>tn",":tabn<CR>") -- go to next tab
|
||||||
|
keymap.set("n","<leader>tp",":tabp<CR>") -- go to previous tab
|
||||||
|
|
||||||
|
keymap.set("n","<leader>sv","<C-w>v") -- split window vertically
|
||||||
|
keymap.set("n","<leader>sh","<C-w>s") -- split window horizontally
|
||||||
|
keymap.set("n","<leader>se","<C-w>=") -- make split windows equal width
|
||||||
|
keymap.set("n","<leader>sx",":close<CR>") -- close current split window
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
|
require("nvim-tree").setup({
|
||||||
|
sort_by = "case-sensitive",
|
||||||
|
actions = {
|
||||||
|
open_file = {quit_on_open=true}
|
||||||
|
},
|
||||||
|
update_focused_file = {
|
||||||
|
enable = true,
|
||||||
|
update_cwd = true
|
||||||
|
},
|
||||||
|
filters = {
|
||||||
|
custom = { '^.git$','node_modules$' }
|
||||||
|
},
|
||||||
|
git = {
|
||||||
|
enable = true
|
||||||
|
},
|
||||||
|
log = {
|
||||||
|
enable = true,
|
||||||
|
types = {
|
||||||
|
diagnostics = true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
enable = true,
|
||||||
|
show_on_dirs=false,
|
||||||
|
debounce_delay=50,
|
||||||
|
icons = {
|
||||||
|
hint = 'H',
|
||||||
|
info = 'I',
|
||||||
|
warning = 'W',
|
||||||
|
error = 'E'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set('n','<c-e>','<cmd>NvimTreeToggle<cr>')
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
vim.cmd [[packadd packer.nvim]]
|
||||||
|
|
||||||
|
return require('packer').startup(function(use)
|
||||||
|
use 'wbthomason/packer.nvim'
|
||||||
|
use 'folke/tokyonight.nvim'
|
||||||
|
use 'nvim-lualine/lualine.nvim'
|
||||||
|
use {
|
||||||
|
'catppuccin/nvim',
|
||||||
|
as = 'catppuccin'
|
||||||
|
}
|
||||||
|
use {
|
||||||
|
'nvim-tree/nvim-tree.lua',
|
||||||
|
requires = {
|
||||||
|
'kyazdani42/nvim-web-devicons',
|
||||||
|
},
|
||||||
|
tag = 'nightly'
|
||||||
|
}
|
||||||
|
end)
|
||||||
Reference in New Issue
Block a user