Skip to content

Commit 19b91ec

Browse files
committed
added custom configuration
1 parent 2abcb39 commit 19b91ec

File tree

9 files changed

+232
-39
lines changed

9 files changed

+232
-39
lines changed

init.lua

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
9191
vim.g.maplocalleader = ' '
9292

9393
-- Set to true if you have a Nerd Font installed and selected in the terminal
94-
vim.g.have_nerd_font = false
94+
vim.g.have_nerd_font = true
9595

9696
-- [[ Setting options ]]
9797
-- See `:help vim.opt`
@@ -403,7 +403,11 @@ require('lazy').setup({
403403
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
404404
-- },
405405
-- },
406-
-- pickers = {}
406+
pickers = {
407+
find_files = {
408+
hidden = true,
409+
},
410+
},
407411
extensions = {
408412
['ui-select'] = {
409413
require('telescope.themes').get_dropdown(),
@@ -665,7 +669,7 @@ require('lazy').setup({
665669
local servers = {
666670
-- clangd = {},
667671
-- gopls = {},
668-
-- pyright = {},
672+
pyright = {},
669673
-- rust_analyzer = {},
670674
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
671675
--
@@ -763,7 +767,7 @@ require('lazy').setup({
763767
formatters_by_ft = {
764768
lua = { 'stylua' },
765769
-- Conform can also run multiple formatters sequentially
766-
-- python = { "isort", "black" },
770+
python = { 'isort', 'black' },
767771
--
768772
-- You can use 'stop_after_first' to run the first available formatter from the list
769773
-- javascript = { "prettierd", "prettier", stop_after_first = true },
@@ -791,12 +795,12 @@ require('lazy').setup({
791795
-- `friendly-snippets` contains a variety of premade snippets.
792796
-- See the README about individual language/framework/plugin snippets:
793797
-- https://github.com/rafamadriz/friendly-snippets
794-
-- {
795-
-- 'rafamadriz/friendly-snippets',
796-
-- config = function()
797-
-- require('luasnip.loaders.from_vscode').lazy_load()
798-
-- end,
799-
-- },
798+
{
799+
'rafamadriz/friendly-snippets',
800+
config = function()
801+
require('luasnip.loaders.from_vscode').lazy_load()
802+
end,
803+
},
800804
},
801805
},
802806
'saadparwaiz1/cmp_luasnip',
@@ -839,13 +843,13 @@ require('lazy').setup({
839843
-- Accept ([y]es) the completion.
840844
-- This will auto-import if your LSP supports it.
841845
-- This will expand snippets if the LSP sent a snippet.
842-
['<C-y>'] = cmp.mapping.confirm { select = true },
846+
-- ['<C-y>'] = cmp.mapping.confirm { select = true },
843847

844848
-- If you prefer more traditional completion keymaps,
845849
-- you can uncomment the following lines
846-
--['<CR>'] = cmp.mapping.confirm { select = true },
847-
--['<Tab>'] = cmp.mapping.select_next_item(),
848-
--['<S-Tab>'] = cmp.mapping.select_prev_item(),
850+
['<CR>'] = cmp.mapping.confirm { select = true },
851+
['<Tab>'] = cmp.mapping.select_next_item(),
852+
['<S-Tab>'] = cmp.mapping.select_prev_item(),
849853

850854
-- Manually trigger a completion from nvim-cmp.
851855
-- Generally you don't need this, because nvim-cmp will display
@@ -889,28 +893,6 @@ require('lazy').setup({
889893
end,
890894
},
891895

892-
{ -- You can easily change to a different colorscheme.
893-
-- Change the name of the colorscheme plugin below, and then
894-
-- change the command in the config to whatever the name of that colorscheme is.
895-
--
896-
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
897-
'folke/tokyonight.nvim',
898-
priority = 1000, -- Make sure to load this before all the other start plugins.
899-
config = function()
900-
---@diagnostic disable-next-line: missing-fields
901-
require('tokyonight').setup {
902-
styles = {
903-
comments = { italic = false }, -- Disable italics in comments
904-
},
905-
}
906-
907-
-- Load the colorscheme here.
908-
-- Like many other themes, this one has different styles, and you could load
909-
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
910-
vim.cmd.colorscheme 'tokyonight-night'
911-
end,
912-
},
913-
914896
-- Highlight todo, notes, etc in comments
915897
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
916898

@@ -986,8 +968,8 @@ require('lazy').setup({
986968
-- Here are some example plugins that I've included in the Kickstart repository.
987969
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
988970
--
989-
-- require 'kickstart.plugins.debug',
990-
-- require 'kickstart.plugins.indent_line',
971+
require 'kickstart.plugins.debug',
972+
require 'kickstart.plugins.indent_line',
991973
-- require 'kickstart.plugins.lint',
992974
-- require 'kickstart.plugins.autopairs',
993975
-- require 'kickstart.plugins.neo-tree',
@@ -997,7 +979,7 @@ require('lazy').setup({
997979
-- This is the easiest way to modularize your config.
998980
--
999981
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
1000-
-- { import = 'custom.plugins' },
982+
{ import = 'custom.plugins' },
1001983
--
1002984
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
1003985
-- Or use telescope!

lua/.exrc

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
let s:cpo_save=&cpo
2+
set cpo&vim
3+
cnoremap <silent> <Plug>(TelescopeFuzzyCommandSearch) e "lua require('telescope.builtin').command_history { default_text = [=[" . escape(getcmdline(), '"') . "]=] }"
4+
inoremap <C-W> u
5+
inoremap <C-U> u
6+
nnoremap  
7+
nnoremap <NL> <NL>
8+
nnoremap  
9+
nnoremap  
10+
nmap  d
11+
tnoremap  
12+
nnoremap  <Cmd>nohlsearch
13+
omap <silent> % <Plug>(MatchitOperationForward)
14+
xmap <silent> % <Plug>(MatchitVisualForward)
15+
nmap <silent> % <Plug>(MatchitNormalForward)
16+
nnoremap & :&&
17+
xnoremap <silent> <expr> @ mode() ==# 'V' ? ':normal! @'.getcharstr().'' : '@'
18+
xnoremap <silent> <expr> Q mode() ==# 'V' ? ':normal! @=reg_recorded()' : 'Q'
19+
nnoremap Y y$
20+
omap <silent> [% <Plug>(MatchitOperationMultiBackward)
21+
xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
22+
nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
23+
omap <silent> ]% <Plug>(MatchitOperationMultiForward)
24+
xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
25+
nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
26+
xmap a% <Plug>(MatchitVisualTextObject)
27+
omap <silent> g% <Plug>(MatchitOperationBackward)
28+
xmap <silent> g% <Plug>(MatchitVisualBackward)
29+
nmap <silent> g% <Plug>(MatchitNormalBackward)
30+
xnoremap <silent> sa :lua MiniSurround.add('visual')
31+
nnoremap <Plug>PlenaryTestFile :lua require('plenary.test_harness').test_file(vim.fn.expand("%:p"))
32+
xmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
33+
onoremap <silent> <Plug>(MatchitOperationMultiForward) :call matchit#MultiMatch("W", "o")
34+
onoremap <silent> <Plug>(MatchitOperationMultiBackward) :call matchit#MultiMatch("bW", "o")
35+
xnoremap <silent> <Plug>(MatchitVisualMultiForward) :call matchit#MultiMatch("W", "n")m'gv``
36+
xnoremap <silent> <Plug>(MatchitVisualMultiBackward) :call matchit#MultiMatch("bW", "n")m'gv``
37+
nnoremap <silent> <Plug>(MatchitNormalMultiForward) :call matchit#MultiMatch("W", "n")
38+
nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :call matchit#MultiMatch("bW", "n")
39+
onoremap <silent> <Plug>(MatchitOperationBackward) :call matchit#Match_wrapper('',0,'o')
40+
onoremap <silent> <Plug>(MatchitOperationForward) :call matchit#Match_wrapper('',1,'o')
41+
xnoremap <silent> <Plug>(MatchitVisualBackward) :call matchit#Match_wrapper('',0,'v')m'gv``
42+
xnoremap <silent> <Plug>(MatchitVisualForward) :call matchit#Match_wrapper('',1,'v'):if col("''") != col("$") | exe ":normal! m'" | endifgv``
43+
nnoremap <silent> <Plug>(MatchitNormalBackward) :call matchit#Match_wrapper('',0,'n')
44+
nnoremap <silent> <Plug>(MatchitNormalForward) :call matchit#Match_wrapper('',1,'n')
45+
nnoremap <C-K> 
46+
nnoremap <C-J> <NL>
47+
nnoremap <C-H> 
48+
nmap <C-W><C-D> d
49+
nnoremap <C-L> 
50+
inoremap  u
51+
inoremap  u
52+
let &cpo=s:cpo_save
53+
unlet s:cpo_save
54+
set clipboard=unnamedplus
55+
set confirm
56+
set grepformat=%f:%l:%c:%m
57+
set grepprg=rg\ --vimgrep\ -uu\
58+
set helplang=en
59+
set ignorecase
60+
set inccommand=split
61+
set listchars=nbsp:␣,tab\ ,trail:·
62+
set noloadplugins
63+
set mouse=a
64+
set packpath=/opt/nvim-linux-x86_64/share/nvim/runtime
65+
set runtimepath=~/.config/nvim,~/.local/share/nvim/lazy/lazy.nvim,~/.local/share/nvim/lazy/cmp-nvim-lsp-signature-help,~/.local/share/nvim/lazy/cmp-path,~/.local/share/nvim/lazy/cmp_luasnip,~/.local/share/nvim/lazy/friendly-snippets,~/.local/share/nvim/lazy/LuaSnip,~/.local/share/nvim/lazy/nvim-cmp,~/.local/share/nvim/lazy/todo-comments.nvim,~/.local/share/nvim/lazy/nvim-web-devicons,~/.local/share/nvim/lazy/telescope-ui-select.nvim,~/.local/share/nvim/lazy/telescope-fzf-native.nvim,~/.local/share/nvim/lazy/plenary.nvim,~/.local/share/nvim/lazy/telescope.nvim,~/.local/share/nvim/lazy/which-key.nvim,~/.local/share/nvim/lazy/mason-nvim-dap.nvim,~/.local/share/nvim/lazy/cmp-nvim-lsp,~/.local/share/nvim/lazy/fidget.nvim,~/.local/share/nvim/lazy/mason-tool-installer.nvim,~/.local/share/nvim/lazy/mason-lspconfig.nvim,~/.local/share/nvim/lazy/mason.nvim,~/.local/share/nvim/lazy/nvim-lspconfig,~/.local/share/nvim/lazy/gitsigns.nvim,~/.local/share/nvim/lazy/vim-sleuth,~/.local/share/nvim/lazy/indent-blankline.nvim,~/.local/share/nvim/lazy/nvim-treesitter,~/.local/share/nvim/lazy/mini.nvim,~/.local/share/nvim/lazy/tokyonight.nvim,/opt/nvim-linux-x86_64/share/nvim/runtime,/opt/nvim-linux-x86_64/share/nvim/runtime/pack/dist/opt/matchit,/opt/nvim-linux-x86_64/lib/nvim,~/.local/state/nvim/lazy/readme,~/.local/share/nvim/lazy/cmp-nvim-lsp-signature-help/after,~/.local/share/nvim/lazy/cmp-path/after,~/.local/share/nvim/lazy/cmp_luasnip/after,~/.local/share/nvim/lazy/cmp-nvim-lsp/after,~/.local/share/nvim/lazy/indent-blankline.nvim/after
66+
set scrolloff=10
67+
set noshowmode
68+
set smartcase
69+
set splitbelow
70+
set splitright
71+
set statusline=%{%(nvim_get_current_win()==#g:actual_curwin\ ||\ &laststatus==3)\ ?\ v:lua.MiniStatusline.active()\ :\ v:lua.MiniStatusline.inactive()%}
72+
set termguicolors
73+
set timeoutlen=300
74+
set undofile
75+
set updatetime=250
76+
set window=83
77+
" vim: set ft=vim :

lua/custom/plugins/catppuccin.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
return {
2+
'catppuccin/nvim',
3+
name = 'catppuccin',
4+
priority = 1000,
5+
opts = {},
6+
config = function()
7+
require('catppuccin').setup {}
8+
vim.cmd.colorscheme 'catppuccin-macchiato'
9+
vim.o.cursorline = true
10+
vim.wo.signcolumn = 'auto'
11+
vim.opt.termguicolors = true
12+
end,
13+
}

lua/custom/plugins/lazygit.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-- nvim v0.8.0
2+
return {
3+
'kdheepak/lazygit.nvim',
4+
lazy = true,
5+
cmd = {
6+
'LazyGit',
7+
'LazyGitConfig',
8+
'LazyGitCurrentFile',
9+
'LazyGitFilter',
10+
'LazyGitFilterCurrentFile',
11+
},
12+
-- optional for floating window border decoration
13+
dependencies = {
14+
'nvim-lua/plenary.nvim',
15+
},
16+
-- setting the keybinding for LazyGit with 'keys' is recommended in
17+
-- order to load the plugin when the command is run for the first time
18+
keys = {
19+
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
20+
},
21+
}

lua/custom/plugins/markview.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- For `plugins/markview.lua` users.
2+
return {
3+
'OXY2DEV/markview.nvim',
4+
lazy = false,
5+
6+
-- For blink.cmp's completion
7+
-- source
8+
-- dependencies = {
9+
-- "saghen/blink.cmp"
10+
-- },
11+
}

lua/custom/plugins/neogen.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
return {
2+
'danymat/neogen',
3+
dependencies = 'nvim-treesitter/nvim-treesitter',
4+
config = true,
5+
-- config = function ()
6+
-- require('neogen').setup {
7+
-- enabled = true,
8+
-- }
9+
-- vim.g.loaded_netrw = 1
10+
-- vim.g.loaded_netrwPlugin = 1
11+
-- end
12+
}

lua/custom/plugins/neotest.lua

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
return {
2+
'nvim-neotest/neotest',
3+
dependencies = {
4+
'nvim-neotest/nvim-nio',
5+
'nvim-lua/plenary.nvim',
6+
'antoinemadec/FixCursorHold.nvim',
7+
'nvim-treesitter/nvim-treesitter',
8+
},
9+
config = function()
10+
require('neotest').setup {
11+
adapters = {
12+
require 'neotest-python' {
13+
dap = { justMyCode = false },
14+
},
15+
},
16+
}
17+
end,
18+
keys = { { '<leader>n', '<cmd>Neotest summary<CR>', desc = '[N]eotest Summary' } },
19+
}

lua/custom/plugins/nvimtree.lua

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
return {
2+
'nvim-tree/nvim-tree.lua',
3+
version = '*',
4+
lazy = false,
5+
dependencies = {
6+
'nvim-tree/nvim-web-devicons',
7+
},
8+
config = function()
9+
local HEIGHT_RATIO = 0.8
10+
local WIDTH_RATIO = 0.5
11+
require('nvim-tree').setup {
12+
view = {
13+
float = {
14+
enable = true,
15+
open_win_config = function()
16+
local screen_w = vim.opt.columns:get()
17+
local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get()
18+
local window_w = screen_w * WIDTH_RATIO
19+
local window_h = screen_h * HEIGHT_RATIO
20+
local window_w_int = math.floor(window_w)
21+
local window_h_int = math.floor(window_h)
22+
local center_x = (screen_w - window_w) / 2
23+
local center_y = ((vim.opt.lines:get() - window_h) / 2) - vim.opt.cmdheight:get()
24+
return {
25+
border = 'rounded',
26+
relative = 'editor',
27+
row = center_y,
28+
col = center_x,
29+
width = window_w_int,
30+
height = window_h_int,
31+
}
32+
end,
33+
},
34+
width = function()
35+
return math.floor(vim.opt.columns:get() * WIDTH_RATIO)
36+
end,
37+
},
38+
}
39+
end,
40+
opts = function()
41+
local mappings = { { '<leader>e', '<cmd>NvimTreeOpen<CR>', desc = 'File [E]xplorer' } }
42+
require('which-key').add(mappings)
43+
end,
44+
}

lua/custom/plugins/sniprun.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
return {
2+
'michaelb/sniprun',
3+
branch = 'master',
4+
5+
build = 'sh install.sh',
6+
-- do 'sh install.sh 1' if you want to force compile locally
7+
-- (instead of fetching a binary from the github release). Requires Rust >= 1.65
8+
9+
config = function()
10+
require('sniprun').setup {
11+
-- your options
12+
}
13+
end,
14+
}

0 commit comments

Comments
 (0)