mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-25 04:27:46 +01:00
nvim: swapped file explorer added indent-lines and fzf
This commit is contained in:
parent
7e82242013
commit
e83f452fc3
@ -1,6 +1,10 @@
|
||||
vim.o.go = 'a'
|
||||
vim.o.showmode = false
|
||||
|
||||
-- disable netrw
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- enable mouse for all modes
|
||||
vim.o.mouse = 'a'
|
||||
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.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
|
||||
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
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'VimLeave' },
|
||||
|
@ -5,7 +5,6 @@ vim.g.mapleader = ","
|
||||
|
||||
-- unmap unwanted commands
|
||||
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', '<F10>', '<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
|
||||
vim.api.nvim_set_keymap('n', '<F3>', ':Navbuddy<CR>', {})
|
||||
|
||||
-- nvim-neo-tree/neo-tree.nvim
|
||||
vim.api.nvim_set_keymap('n', '<F2>', ':Neotree toggle<CR>', {})
|
||||
-- nvim-tree/nvim-tree.lua
|
||||
vim.api.nvim_set_keymap('n', '<F2>', ':NvimTreeToggle toggle<CR>', {})
|
||||
|
||||
-- tpope/vim-fugitive
|
||||
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', '<F5>', ':lua vim.lsp.buf.rename()<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
|
||||
use { 'lewis6991/gitsigns.nvim' }
|
||||
|
||||
-- show indentation lines (in empty lines too)
|
||||
use { 'lukas-reineke/indent-blankline.nvim' }
|
||||
|
||||
-- improved java syntax highlighting
|
||||
use { 'uiiaoo/java-syntax.vim',
|
||||
ft = { 'java' } }
|
||||
ft = { 'java' }
|
||||
}
|
||||
|
||||
-- custom statusline
|
||||
use {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = { 'nvim-tree/nvim-web-devicons',
|
||||
opt = true }
|
||||
use { 'nvim-lualine/lualine.nvim',
|
||||
requires = { 'nvim-tree/nvim-web-devicons' }
|
||||
}
|
||||
|
||||
-- show signature while typing
|
||||
@ -39,26 +41,18 @@ return require("packer").startup(function(use)
|
||||
-- preview for markdown filetypes
|
||||
use { "iamcco/markdown-preview.nvim",
|
||||
ft = { 'md' },
|
||||
run = "cd app && npm install" }
|
||||
run = "cd app && npm install"
|
||||
}
|
||||
|
||||
-- latex asynchronous pdf rendering
|
||||
use { 'donRaphaco/neotex',
|
||||
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",
|
||||
}
|
||||
ft = { 'tex' }
|
||||
}
|
||||
|
||||
-- nim language support
|
||||
use { 'zah/nim.vim',
|
||||
ft = { 'nim' } }
|
||||
ft = { 'nim' }
|
||||
}
|
||||
|
||||
-- automatic closing of brackets
|
||||
use { 'windwp/nvim-autopairs' }
|
||||
@ -79,14 +73,15 @@ return require("packer").startup(function(use)
|
||||
'jose-elias-alvarez/null-ls.nvim',
|
||||
'LostNeophyte/null-ls-embedded',
|
||||
'nvim-lua/plenary.nvim',
|
||||
'jay-babu/mason-null-ls.nvim' } }
|
||||
'jay-babu/mason-null-ls.nvim'
|
||||
}
|
||||
}
|
||||
|
||||
-- showing color of hex values, etc
|
||||
use { 'norcalli/nvim-colorizer.lua' }
|
||||
|
||||
-- show tags
|
||||
use {
|
||||
"SmiteshP/nvim-navbuddy",
|
||||
use { "SmiteshP/nvim-navbuddy",
|
||||
requires = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"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
|
||||
use { 'nvim-treesitter/nvim-treesitter' }
|
||||
|
||||
-- automatically close html-tags
|
||||
use { 'windwp/nvim-ts-autotag',
|
||||
requires = { 'nvim-treesitter/nvim-treesitter' } }
|
||||
requires = { 'nvim-treesitter/nvim-treesitter' }
|
||||
}
|
||||
|
||||
-- colorful brackets
|
||||
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
|
||||
use { 'folke/todo-comments.nvim',
|
||||
requires = { 'nvim-lua/plenary.nvim' } }
|
||||
requires = { 'nvim-lua/plenary.nvim' }
|
||||
}
|
||||
|
||||
-- git wrapper
|
||||
use { 'tpope/vim-fugitive' }
|
||||
|
||||
-- golang language support
|
||||
use { 'fatih/vim-go',
|
||||
ft = { 'go' } }
|
||||
ft = { 'go' }
|
||||
}
|
||||
|
||||
-- markdown language support
|
||||
use { 'preservim/vim-markdown',
|
||||
ft = { 'md' },
|
||||
requires = { 'godlygeek/tabular' } }
|
||||
requires = { 'godlygeek/tabular' }
|
||||
}
|
||||
|
||||
-- bulk renamer
|
||||
use { 'qpkorr/vim-renamer' }
|
||||
|
6
.config/nvim/plugin/indent-blankline.lua
Normal file
6
.config/nvim/plugin/indent-blankline.lua
Normal file
@ -0,0 +1,6 @@
|
||||
-- lukas-reineke/indent-blankline.nvim
|
||||
|
||||
require("indent_blankline").setup {
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
}
|
14
.config/nvim/plugin/nvim-tree.lua
Normal file
14
.config/nvim/plugin/nvim-tree.lua
Normal file
@ -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,
|
||||
},
|
||||
})
|
17
.config/nvim/plugin/telescope.lua
Normal file
17
.config/nvim/plugin/telescope.lua
Normal file
@ -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…
x
Reference in New Issue
Block a user