Compare commits
5 Commits
ae88f67228
...
master
Author | SHA1 | Date | |
---|---|---|---|
b49e96fab3 | |||
25127dd0c9 | |||
0c25d5c867 | |||
10f5c07a9b | |||
c47546d65a |
7
init.lua
7
init.lua
@@ -1,9 +1,13 @@
|
|||||||
require 'plugins'
|
require 'plugins'
|
||||||
|
|
||||||
|
vim.g.loaded = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
require('onedark').setup {
|
require('onedark').setup {
|
||||||
style = 'warmer'
|
style = 'warmer'
|
||||||
}
|
}
|
||||||
require('onedark').load()
|
require('onedark').load()
|
||||||
|
vim.cmd('set background=dark')
|
||||||
|
|
||||||
require 'lsp'
|
require 'lsp'
|
||||||
require 'completion'
|
require 'completion'
|
||||||
@@ -11,4 +15,5 @@ require 'treesitter'
|
|||||||
require 'term'
|
require 'term'
|
||||||
require 'settings'
|
require 'settings'
|
||||||
require 'keys'
|
require 'keys'
|
||||||
|
require("symbols-outline").setup()
|
||||||
|
require"fidget".setup{}
|
||||||
|
11
lua/keys.lua
11
lua/keys.lua
@@ -1,11 +1,10 @@
|
|||||||
local key = vim.api.nvim_set_keymap
|
local key = vim.api.nvim_set_keymap
|
||||||
local u = require('utils')
|
local u = require('utils')
|
||||||
|
|
||||||
vim.cmd([[autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif]])
|
|
||||||
vim.cmd([[autocmd CursorHold * lua vim.diagnostic.open_float({focusable = false})]])
|
vim.cmd([[autocmd CursorHold * lua vim.diagnostic.open_float({focusable = false})]])
|
||||||
|
|
||||||
key('n', ';', ':Telescope find_files<CR>', {})
|
key('n', ';', ':Telescope find_files<CR>', {})
|
||||||
key('', '<C-n>', ':NvimTreeToggle<CR>', {})
|
key('n', '<C-n>', ':NvimTreeToggle<CR>', {})
|
||||||
key('n', 'gh', '/<c-r>=expand("<cword>")<CR><CR>N', {})
|
key('n', 'gh', '/<c-r>=expand("<cword>")<CR><CR>N', {})
|
||||||
|
|
||||||
key('i', '<TAB>', 'pumvisible() ? "<C-n>" : "<Tab>"', { expr = true, silent = true })
|
key('i', '<TAB>', 'pumvisible() ? "<C-n>" : "<Tab>"', { expr = true, silent = true })
|
||||||
@@ -24,3 +23,11 @@ vim.api.nvim_exec(
|
|||||||
false
|
false
|
||||||
)
|
)
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufEnter", {
|
||||||
|
nested = true,
|
||||||
|
callback = function()
|
||||||
|
if #vim.api.nvim_list_wins() == 1 and vim.api.nvim_buf_get_name(0):match("NvimTree_") ~= nil then
|
||||||
|
vim.cmd 'quit'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
@@ -51,7 +51,7 @@ end
|
|||||||
|
|
||||||
-- nvim-cmp supports additional completion capabilities
|
-- nvim-cmp supports additional completion capabilities
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
|
||||||
|
|
||||||
local servers = require'nvim-lsp-installer'
|
local servers = require'nvim-lsp-installer'
|
||||||
|
@@ -1,3 +1,16 @@
|
|||||||
|
local ensure_packer = function()
|
||||||
|
local fn = vim.fn
|
||||||
|
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||||
|
if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
|
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||||
|
vim.cmd [[packadd packer.nvim]]
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local packer_bootstrap = ensure_packer()
|
||||||
|
|
||||||
vim.cmd([[autocmd BufWritePost plugins.lua source <afile> | PackerCompile]])
|
vim.cmd([[autocmd BufWritePost plugins.lua source <afile> | PackerCompile]])
|
||||||
|
|
||||||
return require('packer').startup({function()
|
return require('packer').startup({function()
|
||||||
@@ -56,7 +69,6 @@ return require('packer').startup({function()
|
|||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
requires = { {'nvim-lua/plenary.nvim'} }
|
requires = { {'nvim-lua/plenary.nvim'} }
|
||||||
}
|
}
|
||||||
use {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
|
|
||||||
use 'nvim-lua/plenary.nvim'
|
use 'nvim-lua/plenary.nvim'
|
||||||
use 'L3MON4D3/LuaSnip' -- Snippets plugin
|
use 'L3MON4D3/LuaSnip' -- Snippets plugin
|
||||||
use 'hrsh7th/nvim-cmp' -- Autocompletion plugin
|
use 'hrsh7th/nvim-cmp' -- Autocompletion plugin
|
||||||
@@ -67,6 +79,7 @@ return require('packer').startup({function()
|
|||||||
use 'kdheepak/cmp-latex-symbols'
|
use 'kdheepak/cmp-latex-symbols'
|
||||||
use 'nvim-treesitter/nvim-treesitter'
|
use 'nvim-treesitter/nvim-treesitter'
|
||||||
use 'simrat39/symbols-outline.nvim'
|
use 'simrat39/symbols-outline.nvim'
|
||||||
|
use 'j-hui/fidget.nvim'
|
||||||
|
|
||||||
use 'kyazdani42/nvim-web-devicons'
|
use 'kyazdani42/nvim-web-devicons'
|
||||||
|
|
||||||
@@ -82,6 +95,10 @@ return require('packer').startup({function()
|
|||||||
config = function() require'plugins/nvim-tree' end
|
config = function() require'plugins/nvim-tree' end
|
||||||
}
|
}
|
||||||
use 'justinmk/vim-sneak'
|
use 'justinmk/vim-sneak'
|
||||||
|
|
||||||
|
if packer_bootstrap then
|
||||||
|
require('packer').sync()
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
config = {
|
config = {
|
||||||
display = {
|
display = {
|
||||||
|
Reference in New Issue
Block a user