Browse Source

plugins/all: small changes, fixes and no more unnecessary global variables

my-config
NTBBloodbath 4 years ago
parent
commit
14eaeb66d5
No known key found for this signature in database GPG Key ID: 18D6730BC846AAC5
  1. 2
      lua/configs/nvim-focus.lua
  2. 4
      lua/configs/nvim-telescope.lua
  3. 2
      lua/configs/nvim-toggleterm.lua
  4. 37
      lua/configs/nvim-tree.lua
  5. 8
      lua/configs/statusline.lua
  6. 2
      lua/configs/tree-sitter.lua

2
lua/configs/nvim-focus.lua

@ -1,4 +1,4 @@
focus = require('focus')
local focus = require('focus')
-- Enable focus
focus.enable = true

4
lua/configs/nvim-telescope.lua

@ -1,7 +1,7 @@
-- https://github.com/nvim-telescope/telescope.nvim#telescope-defaults
-- Required to close with ESC in insert mode
actions = require('telescope.actions')
telescope = require('telescope')
local actions = require('telescope.actions')
local telescope = require('telescope')
telescope.setup{
defaults = {

2
lua/configs/nvim-toggleterm.lua

@ -1,4 +1,4 @@
toggleterm = require('toggleterm').setup{
require('toggleterm').setup{
size = 10,
open_mapping = [[<c-t>]],
shade_filetypes = {},

37
lua/configs/nvim-tree.lua

@ -1,39 +1,28 @@
---[[----------------------]]---
-- Vim-related wrappers --
---]]----------------------[[---
-- Access to global variables
g = vim.g
-- Vim commands like 'colorscheme X'
cmd = vim.cmd
---------------------------------------------
-- Empty by default
g.nvim_tree_ignore = { '.git', 'node_modules', '.cache', '__pycache__' }
vim.g.nvim_tree_ignore = { '.git', 'node_modules', '.cache', '__pycache__' }
-- False by default, opens the tree when typing `vim $DIR` or `vim`
g.nvim_tree_auto_open = false
vim.g.nvim_tree_auto_open = 0
-- False by default, closes the tree when it is the last window
g.nvim_tree_auto_close = false
vim.g.nvim_tree_auto_close = 0
-- False by default, closes the tree when you open a file
g.nvim_tree_quit_on_open = true
vim.g.nvim_tree_quit_on_open = 1
-- False by default, this option allows the cursor to be updated when entering a buffer
g.nvim_tree_follow = true
vim.g.nvim_tree_follow = 1
-- False by default, this option shows indent markers when folders are open
g.nvim_tree_indent_markers = true
vim.g.nvim_tree_indent_markers = 1
-- False by default, will enable file highlight for git attributes (can be used without the icons).
g.nvim_tree_git_hl = true
vim.g.nvim_tree_git_hl = 1
-- This is the default. See :help filename-modifiers for more options
g.nvim_tree_root_folder_modifier = ':~'
vim.g.nvim_tree_root_folder_modifier = ':~'
-- False by default, will open the tree when entering a new tab and the tree was previously open
g.nvim_tree_tab_open = true
vim.g.nvim_tree_tab_open = 1
-- False by default, will not resize the tree when opening a file
g.nvim_tree_width_allow_resize = true
vim.g.nvim_tree_width_allow_resize = 1
--- Tree icons
-- If false, do not show the icons for one of 'git' 'folder' and 'files'
-- true by default, notice that if 'files' is 1, it will only display
-- if nvim-web-devicons is installed and on your runtimepath
g.nvim_tree_show_icons = {
vim.g.nvim_tree_show_icons = {
git = 1,
folders = 1,
files = 1,
@ -41,7 +30,7 @@ g.nvim_tree_show_icons = {
-- You can edit keybindings be defining this variable
-- You don't have to define all keys.
-- NOTE: the 'edit' key will wrap/unwrap a folder and open a file
g.nvim_tree_bindings = {
vim.g.nvim_tree_bindings = {
edit = {"<CR>", "o"},
edit_vsplit = "<C-v>",
edit_split = "<C-x>",
@ -66,7 +55,7 @@ g.nvim_tree_bindings = {
-- default will show icon by default if no icon is provided
-- default shows no icon by default
g.nvim_tree_icons = {
vim.g.nvim_tree_icons = {
default = "",
symlink = "",
git = {

8
lua/configs/statusline.lua

@ -1,9 +1,9 @@
-- Extracted from https://github.com/glepnir/galaxyline.nvim/blob/main/example/eviline.lua
-- Credits goes to its author (glepnir) :)
gl = require('galaxyline')
colors = require('galaxyline.theme').default
condition = require('galaxyline.condition')
gls = gl.section
local gl = require('galaxyline')
local colors = require('galaxyline.theme').default
local condition = require('galaxyline.condition')
local gls = gl.section
gl.short_line_list = {'NvimTree','vista','dbui','packer'}

2
lua/configs/tree-sitter.lua

@ -1,4 +1,4 @@
ts = require('nvim-treesitter.configs')
local ts = require('nvim-treesitter.configs')
--[[
Here you can use the maintained value which indicates that we wish to use all
maintained languages modules instead of a list of languages. You also need to

Loading…
Cancel
Save