Skip to content

Commit 0788092

Browse files
committed
feat: add initial implementation
1 parent 4b006aa commit 0788092

File tree

8 files changed

+117
-0
lines changed

8 files changed

+117
-0
lines changed

init.lua

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
-- encoding
2+
vim.o.encofing = 'utf-8'
3+
vim.scriptencoding = 'utf-8'
4+
5+
-- visual
6+
vim.o.ambiwidth = 'double'
7+
vim.o.tabstop = 2
8+
vim.o.softtabstop = 2
9+
vim.o.shiftwidth = 2
10+
vim.o.expandtab = true
11+
vim.o.autoindent = true
12+
vim.o.smartindent = true
13+
14+
vim.o.visualbell = true
15+
vim.o.number = true
16+
vim.o.showmatch = true
17+
vim.o.matchtime = 1
18+
19+
-- search
20+
vim.o.incsearch = true
21+
vim.o.ignorecase = true
22+
vim.o.smartcase = true
23+
vim.o.hlsearch = true
24+
vim.api.nvim_set_keymap('n', '<Esc><Esc>', ':nohl<CR>', { noremap = true, silent = true})
25+
26+
-- manipulation
27+
vim.g.mapleader = ' '
28+
vim.opt.clipboard:append{'unnamedplus'}
29+
vim.o.ttimeout = true
30+
vim.o.ttimeoutlen = 50
31+
32+
vim.o.undofile = true
33+
vim.o.undodir = vim.fn.stdpath('cache') .. '/undo'
34+
35+
vim.api.nvim_set_keymap('n', 'j', 'gj', { noremap = true })
36+
vim.api.nvim_set_keymap('n', 'k', 'gk', { noremap = true })
37+
vim.api.nvim_set_keymap('n', '<Down>', 'gj', { noremap = true })
38+
vim.api.nvim_set_keymap('n', '<Up>', 'gk', { noremap = true })
39+
vim.api.nvim_set_keymap('n', 'gj', 'j', { noremap = true })
40+
vim.api.nvim_set_keymap('n', 'gk', 'k', { noremap = true })
41+
42+
-- d -> delete
43+
vim.api.nvim_set_keymap('n', 'd', '"_d', { noremap = true })
44+
45+
-- load lazy.nvim
46+
require('lazy_nvim')

lazy-lock.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"Comment.nvim": { "branch": "master", "commit": "eab2c83a0207369900e92783f56990808082eac2" },
3+
"darcula": { "branch": "master", "commit": "92e8f51d82b36fc6cca148eb98dd3e4cfacc92cd" },
4+
"editorconfig-vim": { "branch": "master", "commit": "ee6e91ca09d59043d365bd96a32e989bd75abe84" },
5+
"gitsigns.nvim": { "branch": "main", "commit": "c52162b7b34a21bdc476425a4ab562c2f7bf1bb1" },
6+
"lazy.nvim": { "branch": "main", "commit": "9b208696e139a404d159963b975a5b90af38439b" },
7+
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
8+
"nvim-tree.lua": { "branch": "master", "commit": "9e87ee2d6e86f37ff09cb74ec7dcf2ac984a01e9" },
9+
"nvim-web-devicons": { "branch": "master", "commit": "3548363849878ef895ce54edda02421279b419d8" }
10+
}

lua/config/comment.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require('Comment').setup()
2+
vim.api.nvim_set_keymap('n', '<C-_>', 'gcc', {})
3+
vim.api.nvim_set_keymap('v', '<C-_>', 'gc', {})

lua/config/gitsigns.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('gitsigns').setup()

lua/config/lualine.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('lualine').setup()

lua/config/nvim-tree.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require("nvim-tree").setup({
2+
open_on_setup_file = true
3+
})

lua/lazy_nvim.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
2+
if not vim.loop.fs_stat(lazypath) then
3+
vim.fn.system({
4+
"git",
5+
"clone",
6+
"--filter=blob:none",
7+
"https://github.com/folke/lazy.nvim.git",
8+
"--branch=stable", -- latest stable release
9+
lazypath,
10+
})
11+
end
12+
vim.opt.rtp:prepend(lazypath)
13+
14+
plugins = require('plugins')
15+
16+
require('lazy').setup(plugins)

lua/plugins.lua

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
return {
2+
{ -- colorscheme
3+
'blueshirts/darcula',
4+
config = function()
5+
vim.cmd([[colorscheme darcula]])
6+
end
7+
},
8+
'editorconfig/editorconfig-vim',
9+
{
10+
'nvim-lualine/lualine.nvim',
11+
dependencies = { 'nvim-tree/nvim-web-devicons' },
12+
config = function()
13+
require('config/lualine')
14+
end
15+
},
16+
{
17+
'lewis6991/gitsigns.nvim',
18+
config = function()
19+
require('config/gitsigns')
20+
end
21+
},
22+
{
23+
'numToStr/Comment.nvim',
24+
config = function()
25+
require('config/comment')
26+
end
27+
},
28+
{
29+
'nvim-tree/nvim-tree.lua',
30+
dependencies = {
31+
'nvim-tree/nvim-web-devicons',
32+
},
33+
config = function()
34+
require('config/nvim-tree')
35+
end
36+
}
37+
}

0 commit comments

Comments
 (0)