nvim: swapped file explorer added indent-lines and fzf

master
tiyn 1 year ago
parent 7e82242013
commit e83f452fc3

@ -1,6 +1,10 @@
vim.o.go = 'a' vim.o.go = 'a'
vim.o.showmode = false vim.o.showmode = false
-- disable netrw
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- enable mouse for all modes -- enable mouse for all modes
vim.o.mouse = 'a' vim.o.mouse = 'a'
vim.o.clipboard = 'unnamedplus' vim.o.clipboard = 'unnamedplus'
@ -61,6 +65,11 @@ vim.o.undodir = vim.env.XDG_CACHE_HOME .. "/vim/undo"
vim.g.python_host_prog = '/usr/bin/python2' vim.g.python_host_prog = '/usr/bin/python2'
vim.g.python3_host_prog = '/usr/bin/python3' vim.g.python3_host_prog = '/usr/bin/python3'
-- append
vim.opt.list = true
vim.opt.listchars:append "space:·"
vim.opt.listchars:append "eol:"
-- set filetypes correctly by extension -- set filetypes correctly by extension
require('autocmd') require('autocmd')

@ -16,13 +16,6 @@ vim.filetype.add({
} }
}) })
-- delete trailing whitespaces on save
vim.api.nvim_create_autocmd({ 'BufWritePre' },
{
pattern = { '*' },
command = [[%s/\s\+$//e]],
})
-- settings for filetype: c -- settings for filetype: c
vim.api.nvim_create_autocmd({ 'VimLeave' }, vim.api.nvim_create_autocmd({ 'VimLeave' },

@ -5,7 +5,6 @@ vim.g.mapleader = ","
-- unmap unwanted commands -- unmap unwanted commands
vim.api.nvim_set_keymap('n', '<F1>', '<NOP>', { noremap = true }) vim.api.nvim_set_keymap('n', '<F1>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F4>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F9>', '<NOP>', { noremap = true }) vim.api.nvim_set_keymap('n', '<F9>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F10>', '<NOP>', { noremap = true }) vim.api.nvim_set_keymap('n', '<F10>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F11>', '<NOP>', { noremap = true }) vim.api.nvim_set_keymap('n', '<F11>', '<NOP>', { noremap = true })
@ -59,8 +58,8 @@ vim.api.nvim_create_autocmd('FileType', {
-- SmiteshP/nvim-navbuddy -- SmiteshP/nvim-navbuddy
vim.api.nvim_set_keymap('n', '<F3>', ':Navbuddy<CR>', {}) vim.api.nvim_set_keymap('n', '<F3>', ':Navbuddy<CR>', {})
-- nvim-neo-tree/neo-tree.nvim -- nvim-tree/nvim-tree.lua
vim.api.nvim_set_keymap('n', '<F2>', ':Neotree toggle<CR>', {}) vim.api.nvim_set_keymap('n', '<F2>', ':NvimTreeToggle toggle<CR>', {})
-- tpope/vim-fugitive -- tpope/vim-fugitive
vim.api.nvim_set_keymap('n', '<leader>ga', ':Git add %:p<CR><CR>', { noremap = true }) vim.api.nvim_set_keymap('n', '<leader>ga', ':Git add %:p<CR><CR>', { noremap = true })
@ -80,3 +79,6 @@ vim.api.nvim_set_keymap('n', 'gr', ':lua vim.lsp.buf.references()<CR>', { norema
vim.api.nvim_set_keymap('n', 'K', ':lua vim.lsp.buf.hover()<CR>', { noremap = true }) vim.api.nvim_set_keymap('n', 'K', ':lua vim.lsp.buf.hover()<CR>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F5>', ':lua vim.lsp.buf.rename()<CR>', { noremap = true }) vim.api.nvim_set_keymap('n', '<F5>', ':lua vim.lsp.buf.rename()<CR>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F8>', ':lua vim.lsp.buf.format()<CR>', { noremap = true }) vim.api.nvim_set_keymap('n', '<F8>', ':lua vim.lsp.buf.format()<CR>', { noremap = true })
-- nvim-telescope/telescope.nvim
vim.api.nvim_set_keymap('n', '<F4>', ':Telescope find_files<CR>', { noremap = true })

@ -22,15 +22,17 @@ return require("packer").startup(function(use)
-- indicate git diff status of line -- indicate git diff status of line
use { 'lewis6991/gitsigns.nvim' } use { 'lewis6991/gitsigns.nvim' }
-- show indentation lines (in empty lines too)
use { 'lukas-reineke/indent-blankline.nvim' }
-- improved java syntax highlighting -- improved java syntax highlighting
use { 'uiiaoo/java-syntax.vim', use { 'uiiaoo/java-syntax.vim',
ft = { 'java' } } ft = { 'java' }
}
-- custom statusline -- custom statusline
use { use { 'nvim-lualine/lualine.nvim',
'nvim-lualine/lualine.nvim', requires = { 'nvim-tree/nvim-web-devicons' }
requires = { 'nvim-tree/nvim-web-devicons',
opt = true }
} }
-- show signature while typing -- show signature while typing
@ -39,26 +41,18 @@ return require("packer").startup(function(use)
-- preview for markdown filetypes -- preview for markdown filetypes
use { "iamcco/markdown-preview.nvim", use { "iamcco/markdown-preview.nvim",
ft = { 'md' }, ft = { 'md' },
run = "cd app && npm install" } run = "cd app && npm install"
}
-- latex asynchronous pdf rendering -- latex asynchronous pdf rendering
use { 'donRaphaco/neotex', use { 'donRaphaco/neotex',
ft = { 'tex' } } ft = { 'tex' }
-- fileexplorer on the side
use {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
requires = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
}
} }
-- nim language support -- nim language support
use { 'zah/nim.vim', use { 'zah/nim.vim',
ft = { 'nim' } } ft = { 'nim' }
}
-- automatic closing of brackets -- automatic closing of brackets
use { 'windwp/nvim-autopairs' } use { 'windwp/nvim-autopairs' }
@ -79,14 +73,15 @@ return require("packer").startup(function(use)
'jose-elias-alvarez/null-ls.nvim', 'jose-elias-alvarez/null-ls.nvim',
'LostNeophyte/null-ls-embedded', 'LostNeophyte/null-ls-embedded',
'nvim-lua/plenary.nvim', 'nvim-lua/plenary.nvim',
'jay-babu/mason-null-ls.nvim' } } 'jay-babu/mason-null-ls.nvim'
}
}
-- showing color of hex values, etc -- showing color of hex values, etc
use { 'norcalli/nvim-colorizer.lua' } use { 'norcalli/nvim-colorizer.lua' }
-- show tags -- show tags
use { use { "SmiteshP/nvim-navbuddy",
"SmiteshP/nvim-navbuddy",
requires = { requires = {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
"SmiteshP/nvim-navic", "SmiteshP/nvim-navic",
@ -94,31 +89,52 @@ return require("packer").startup(function(use)
} }
} }
-- fileexplorer on the side
use { "nvim-tree/nvim-tree.lua",
requires = {
"nvim-tree/nvim-web-devicons",
}
}
-- better language highlighting by improved parsing -- better language highlighting by improved parsing
use { 'nvim-treesitter/nvim-treesitter' } use { 'nvim-treesitter/nvim-treesitter' }
-- automatically close html-tags -- automatically close html-tags
use { 'windwp/nvim-ts-autotag', use { 'windwp/nvim-ts-autotag',
requires = { 'nvim-treesitter/nvim-treesitter' } } requires = { 'nvim-treesitter/nvim-treesitter' }
}
-- colorful brackets -- colorful brackets
use { 'luochen1990/rainbow' } use { 'luochen1990/rainbow' }
-- fuzzy finder
use {
'nvim-telescope/telescope.nvim',
tag = '0.1.2',
requires = { 'nvim-lua/plenary.nvim' }
}
-- clean up white spaces and empty lines before writing
use { "mcauley-penney/tidy.nvim" }
-- todo symbols and highlighting -- todo symbols and highlighting
use { 'folke/todo-comments.nvim', use { 'folke/todo-comments.nvim',
requires = { 'nvim-lua/plenary.nvim' } } requires = { 'nvim-lua/plenary.nvim' }
}
-- git wrapper -- git wrapper
use { 'tpope/vim-fugitive' } use { 'tpope/vim-fugitive' }
-- golang language support -- golang language support
use { 'fatih/vim-go', use { 'fatih/vim-go',
ft = { 'go' } } ft = { 'go' }
}
-- markdown language support -- markdown language support
use { 'preservim/vim-markdown', use { 'preservim/vim-markdown',
ft = { 'md' }, ft = { 'md' },
requires = { 'godlygeek/tabular' } } requires = { 'godlygeek/tabular' }
}
-- bulk renamer -- bulk renamer
use { 'qpkorr/vim-renamer' } use { 'qpkorr/vim-renamer' }

@ -0,0 +1,6 @@
-- lukas-reineke/indent-blankline.nvim
require("indent_blankline").setup {
show_current_context = true,
show_current_context_start = true,
}

@ -0,0 +1,14 @@
-- nvim-tree/nvim-tree.lua
require("nvim-tree").setup({
sort_by = "case_sensitive",
view = {
width = 30,
},
renderer = {
group_empty = true,
},
filters = {
dotfiles = true,
},
})

@ -0,0 +1,17 @@
require("telescope").setup {
extensions = {
file_browser = {
theme = "ivy",
-- disables netrw and use telescope-file-browser in its place
hijack_netrw = true,
mappings = {
["i"] = {
-- your custom insert mode mappings
},
["n"] = {
-- your custom normal mode mappings
},
},
},
},
}
Loading…
Cancel
Save