NeoVIM LUA init file
This commit is contained in:
parent
d724d93b1e
commit
b48adf0a8d
107
neovim/init.lua
Normal file
107
neovim/init.lua
Normal file
@ -0,0 +1,107 @@
|
||||
local Plug = vim.fn['plug#']
|
||||
|
||||
vim.call('plug#begin', '~/.local/share/nvim/site/plugged')
|
||||
|
||||
Plug 'junegunn/goyo.vim'
|
||||
Plug 'karb94/neoscroll.nvim'
|
||||
Plug 'nvim-lua/plenary.nvim'
|
||||
Plug ('nvim-telescope/telescope.nvim', { tag = '0.1.x' })
|
||||
Plug ('nvim-telescope/telescope-fzf-native.nvim', { ['do'] = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' })
|
||||
Plug ('nvim-telescope/telescope-fzf-native.nvim', { ['do'] = 'make' })
|
||||
Plug 'nvim-treesitter/nvim-treesitter'
|
||||
Plug 'nvim-tree/nvim-web-devicons'
|
||||
Plug 'ggandor/leap.nvim'
|
||||
Plug 'sindrets/diffview.nvim'
|
||||
|
||||
vim.call('plug#end')
|
||||
|
||||
vim.cmd [[
|
||||
set number
|
||||
]]
|
||||
|
||||
require('neoscroll').setup({
|
||||
-- All these keys will be mapped to their corresponding default scrolling animation
|
||||
mappings = {'<C-u>', '<C-d>', '<C-b>', '<C-f>',
|
||||
'<C-y>', '<C-e>', 'zt', 'zz', 'zb'},
|
||||
hide_cursor = true, -- Hide cursor while scrolling
|
||||
stop_eof = true, -- Stop at <EOF> when scrolling downwards
|
||||
respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
|
||||
cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
|
||||
easing_function = nil, -- Default easing function
|
||||
pre_hook = nil, -- Function to run before the scrolling animation starts
|
||||
post_hook = nil, -- Function to run after the scrolling animation ends
|
||||
performance_mode = false, -- Disable "Performance Mode" on all buffers.
|
||||
})
|
||||
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||
ensure_installed = "all" ,
|
||||
|
||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
-- Automatically install missing parsers when entering buffer
|
||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||
auto_install = true,
|
||||
|
||||
-- List of parsers to ignore installing (for "all")
|
||||
--ignore_install = { "javascript" },
|
||||
|
||||
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
|
||||
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
|
||||
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
|
||||
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
|
||||
-- the name of the parser)
|
||||
-- list of language that will be disabled
|
||||
--disable = { "c", "rust" },
|
||||
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
|
||||
require('telescope').setup{
|
||||
defaults = {
|
||||
-- Default configuration for telescope goes here:
|
||||
-- config_key = value,
|
||||
mappings = {
|
||||
i = {
|
||||
-- map actions.which_key to <C-h> (default: <C-/>)
|
||||
-- actions.which_key shows the mappings for your picker,
|
||||
-- e.g. git_{create, delete, ...}_branch for the git_branches picker
|
||||
["<C-h>"] = "which_key"
|
||||
}
|
||||
}
|
||||
},
|
||||
pickers = {
|
||||
-- Default configuration for builtin pickers goes here:
|
||||
-- picker_name = {
|
||||
-- picker_config_key = value,
|
||||
-- ...
|
||||
-- }
|
||||
-- Now the picker_config_key will be applied every time you call this
|
||||
-- builtin picker
|
||||
},
|
||||
extensions = {
|
||||
-- Your extension configuration goes here:
|
||||
-- extension_name = {
|
||||
-- extension_config_key = value,
|
||||
-- }
|
||||
-- please take a look at the readme of the extension you want to configure
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user