Made updating files better, and much more
This commit is contained in:
parent
483afbb696
commit
1bf00f5b36
12 changed files with 52 additions and 47 deletions
|
@ -1,7 +1,11 @@
|
||||||
{
|
{
|
||||||
"diagnostic.refreshOnInsertMode": true,
|
"diagnostic.refreshOnInsertMode": true,
|
||||||
"coc.preferences.formatOnSaveFiletypes": ["*"],
|
"coc.preferences.formatOnSave": true,
|
||||||
"Lua.telemetry.enable": false,
|
"Lua.telemetry.enable": false,
|
||||||
"sumneko-lua.enableNvimLuaDev": true,
|
"sumneko-lua.enableNvimLuaDev": true,
|
||||||
"diagnostic.virtualText": true
|
"diagnostic.virtualText": true,
|
||||||
|
"diagnostic.virtualTextCurrentLineOnly": false,
|
||||||
|
"prettier.tabWidth": 4,
|
||||||
|
"javascript.format.semicolons": "remove",
|
||||||
|
"prettier.semi": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
require "options"
|
require "options"
|
||||||
require "plugins"
|
require "plugins"
|
||||||
require "theme"
|
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
local keymap = vim.keymap.set
|
local keymap = vim.keymap.set
|
||||||
local expr_opts = { replace_keycodes = false, expr = true }
|
local expr_opts = { replace_keycodes = false, expr = true }
|
||||||
|
|
||||||
vim.diagnostic.config { virtual_text = true }
|
|
||||||
|
|
||||||
keymap(
|
keymap(
|
||||||
"i",
|
"i",
|
||||||
"<Enter>",
|
"<Enter>",
|
||||||
|
@ -23,3 +21,5 @@ keymap(
|
||||||
[[ coc#pum#visible() ? coc#pum#prev(1) : "\<Up>" ]],
|
[[ coc#pum#visible() ? coc#pum#prev(1) : "\<Up>" ]],
|
||||||
expr_opts
|
expr_opts
|
||||||
)
|
)
|
||||||
|
|
||||||
|
keymap("i", "<C-Space>", [[coc#refresh()]], expr_opts)
|
||||||
|
|
|
@ -1,12 +1,7 @@
|
||||||
local keymap = vim.keymap.set
|
local keymap = vim.keymap.set
|
||||||
|
|
||||||
keymap("i", "<A-;>", "<C-O>:")
|
keymap("i", "<A-;>", "<C-O>:")
|
||||||
keymap("i", "<C-q>", vim.cmd.quitall)
|
keymap("i", "<C-q>", function() vim.cmd.call "novim_mode#ExitVim()" end)
|
||||||
keymap("i", "<C-s>", function()
|
keymap("i", "<C-s>", function()
|
||||||
local exit = os.execute("test -w " .. vim.fn.expand("%:p"))
|
local success = pcall(vim.cmd.update)
|
||||||
if exit == 0 then
|
if not success then vim.cmd.SudaWrite() end
|
||||||
vim.cmd.write()
|
|
||||||
else
|
|
||||||
vim.cmd.SudaWrite()
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -12,4 +12,4 @@ nvimtree.setup({
|
||||||
})
|
})
|
||||||
|
|
||||||
-- open file tree
|
-- open file tree
|
||||||
keymap("i", "<A-e>", "<cmd>:NvimTreeToggle<CR>")
|
keymap("i", "<C-e>", [[<cmd>:NvimTreeToggle<CR>]])
|
||||||
|
|
1
config/nvim/lua/config/onedark.lua
Normal file
1
config/nvim/lua/config/onedark.lua
Normal file
|
@ -0,0 +1 @@
|
||||||
|
require('onedark').load()
|
|
@ -1,2 +1,2 @@
|
||||||
local toggleterm = require("toggleterm")
|
local toggleterm = require("toggleterm")
|
||||||
toggleterm.setup { open_mapping = [[<C-Space>]], direction = "float" }
|
toggleterm.setup { open_mapping = [[<A-`>]], direction = "float" }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
require("nvim-treesitter.configs").setup({
|
require("nvim-treesitter.configs").setup({
|
||||||
rainbow = {
|
rainbow = {
|
||||||
enable = false,
|
enable = true,
|
||||||
extended_mode = true,
|
extended_mode = true,
|
||||||
max_file_lines = nil,
|
max_file_lines = nil,
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,7 +2,9 @@ vim.g.novim_mode_use_general_app_shortcuts = 0
|
||||||
vim.g.session_lock_enabled = 0
|
vim.g.session_lock_enabled = 0
|
||||||
vim.g.session_autosave = 'yes'
|
vim.g.session_autosave = 'yes'
|
||||||
vim.g.sudo_smart_edit = 1
|
vim.g.sudo_smart_edit = 1
|
||||||
vim.opt.shiftwidth = 0
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
vim.opt.backup = false
|
vim.opt.backup = false
|
||||||
vim.opt.clipboard = "unnamedplus"
|
vim.opt.clipboard = "unnamedplus"
|
||||||
vim.opt.cmdheight = 1;
|
vim.opt.cmdheight = 1;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local packer = require("packer")
|
local packer = require("packer")
|
||||||
|
|
||||||
function config(name)
|
local function config(name)
|
||||||
return string.format('require "config.%s"', name)
|
return string.format('require "config.%s"', name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ return packer.startup({ function(use)
|
||||||
use "xolox/vim-session"
|
use "xolox/vim-session"
|
||||||
|
|
||||||
-- Theming
|
-- Theming
|
||||||
use "navarasu/onedark.nvim"
|
use { "navarasu/onedark.nvim", config = config("onedark") }
|
||||||
use { 'lukas-reineke/indent-blankline.nvim', config = config("indent-blankline") }
|
use { 'lukas-reineke/indent-blankline.nvim', config = config("indent-blankline") }
|
||||||
use {
|
use {
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
vim.cmd "colorscheme onedark"
|
|
|
@ -144,6 +144,7 @@ _G.packer_plugins = {
|
||||||
url = "https://github.com/kyazdani42/nvim-web-devicons"
|
url = "https://github.com/kyazdani42/nvim-web-devicons"
|
||||||
},
|
},
|
||||||
["onedark.nvim"] = {
|
["onedark.nvim"] = {
|
||||||
|
config = { 'require "config.onedark"' },
|
||||||
loaded = true,
|
loaded = true,
|
||||||
path = "/home/quadradical/.local/share/nvim/site/pack/packer/start/onedark.nvim",
|
path = "/home/quadradical/.local/share/nvim/site/pack/packer/start/onedark.nvim",
|
||||||
url = "https://github.com/navarasu/onedark.nvim"
|
url = "https://github.com/navarasu/onedark.nvim"
|
||||||
|
@ -182,46 +183,50 @@ _G.packer_plugins = {
|
||||||
}
|
}
|
||||||
|
|
||||||
time([[Defining packer_plugins]], false)
|
time([[Defining packer_plugins]], false)
|
||||||
-- Config for: coc.nvim
|
|
||||||
time([[Config for coc.nvim]], true)
|
|
||||||
require "config.coc"
|
|
||||||
time([[Config for coc.nvim]], false)
|
|
||||||
-- Config for: barbar.nvim
|
|
||||||
time([[Config for barbar.nvim]], true)
|
|
||||||
require "config.barbar"
|
|
||||||
time([[Config for barbar.nvim]], false)
|
|
||||||
-- Config for: nvim-tree.lua
|
-- Config for: nvim-tree.lua
|
||||||
time([[Config for nvim-tree.lua]], true)
|
time([[Config for nvim-tree.lua]], true)
|
||||||
require "config.nvim-tree"
|
require "config.nvim-tree"
|
||||||
time([[Config for nvim-tree.lua]], false)
|
time([[Config for nvim-tree.lua]], false)
|
||||||
-- Config for: dashboard-nvim
|
|
||||||
time([[Config for dashboard-nvim]], true)
|
|
||||||
require "config.dashboard"
|
|
||||||
time([[Config for dashboard-nvim]], false)
|
|
||||||
-- Config for: nvim-treesitter
|
-- Config for: nvim-treesitter
|
||||||
time([[Config for nvim-treesitter]], true)
|
time([[Config for nvim-treesitter]], true)
|
||||||
require "config.treesitter"
|
require "config.treesitter"
|
||||||
time([[Config for nvim-treesitter]], false)
|
time([[Config for nvim-treesitter]], false)
|
||||||
-- Config for: lualine.nvim
|
|
||||||
time([[Config for lualine.nvim]], true)
|
|
||||||
require "config.lualine"
|
|
||||||
time([[Config for lualine.nvim]], false)
|
|
||||||
-- Config for: indent-blankline.nvim
|
-- Config for: indent-blankline.nvim
|
||||||
time([[Config for indent-blankline.nvim]], true)
|
time([[Config for indent-blankline.nvim]], true)
|
||||||
require "config.indent-blankline"
|
require "config.indent-blankline"
|
||||||
time([[Config for indent-blankline.nvim]], false)
|
time([[Config for indent-blankline.nvim]], false)
|
||||||
-- Config for: novim-mode
|
|
||||||
time([[Config for novim-mode]], true)
|
|
||||||
require "config.novim"
|
|
||||||
time([[Config for novim-mode]], false)
|
|
||||||
-- Config for: toggleterm.nvim
|
|
||||||
time([[Config for toggleterm.nvim]], true)
|
|
||||||
require "config.toggleterm"
|
|
||||||
time([[Config for toggleterm.nvim]], false)
|
|
||||||
-- Config for: Comment.nvim
|
-- Config for: Comment.nvim
|
||||||
time([[Config for Comment.nvim]], true)
|
time([[Config for Comment.nvim]], true)
|
||||||
require "config.comment"
|
require "config.comment"
|
||||||
time([[Config for Comment.nvim]], false)
|
time([[Config for Comment.nvim]], false)
|
||||||
|
-- Config for: lualine.nvim
|
||||||
|
time([[Config for lualine.nvim]], true)
|
||||||
|
require "config.lualine"
|
||||||
|
time([[Config for lualine.nvim]], false)
|
||||||
|
-- Config for: barbar.nvim
|
||||||
|
time([[Config for barbar.nvim]], true)
|
||||||
|
require "config.barbar"
|
||||||
|
time([[Config for barbar.nvim]], false)
|
||||||
|
-- Config for: onedark.nvim
|
||||||
|
time([[Config for onedark.nvim]], true)
|
||||||
|
require "config.onedark"
|
||||||
|
time([[Config for onedark.nvim]], false)
|
||||||
|
-- Config for: novim-mode
|
||||||
|
time([[Config for novim-mode]], true)
|
||||||
|
require "config.novim"
|
||||||
|
time([[Config for novim-mode]], false)
|
||||||
|
-- Config for: coc.nvim
|
||||||
|
time([[Config for coc.nvim]], true)
|
||||||
|
require "config.coc"
|
||||||
|
time([[Config for coc.nvim]], false)
|
||||||
|
-- Config for: toggleterm.nvim
|
||||||
|
time([[Config for toggleterm.nvim]], true)
|
||||||
|
require "config.toggleterm"
|
||||||
|
time([[Config for toggleterm.nvim]], false)
|
||||||
|
-- Config for: dashboard-nvim
|
||||||
|
time([[Config for dashboard-nvim]], true)
|
||||||
|
require "config.dashboard"
|
||||||
|
time([[Config for dashboard-nvim]], false)
|
||||||
|
|
||||||
_G._packer.inside_compile = false
|
_G._packer.inside_compile = false
|
||||||
if _G._packer.needs_bufread == true then
|
if _G._packer.needs_bufread == true then
|
||||||
|
|
Reference in a new issue