formatting code
This commit is contained in:
parent
8c649c09ba
commit
279e684a60
2
init.lua
2
init.lua
|
|
@ -29,6 +29,6 @@ for _, module in ipairs(modules) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
require ("core.utils").load_mappings()
|
require("core.utils").load_mappings()
|
||||||
|
|
||||||
vim.api.nvim_command("colorscheme gruvbox-baby")
|
vim.api.nvim_command("colorscheme gruvbox-baby")
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ local M = {}
|
||||||
|
|
||||||
M.general = {
|
M.general = {
|
||||||
n = {
|
n = {
|
||||||
["<ESC>"] = { "<cmd> noh <CR>", "no highlight"},
|
["<ESC>"] = { "<cmd> noh <CR>", "no highlight" },
|
||||||
|
|
||||||
-- switch between windows
|
-- switch between windows
|
||||||
["<C-h>"] = { "<C-w>h", "window left" },
|
["<C-h>"] = { "<C-w>h", "window left" },
|
||||||
|
|
@ -279,12 +279,12 @@ M.lspconfig = {
|
||||||
M.rust = {
|
M.rust = {
|
||||||
plugin = true,
|
plugin = true,
|
||||||
n = {
|
n = {
|
||||||
["<leader>rr"] = { "<cmd> RustRun <CR>", "RustRun"},
|
["<leader>rr"] = { "<cmd> RustRun <CR>", "RustRun" },
|
||||||
["<leader>rR"] = { "<cmd> RustRunnables <CR>", "RustRunnables"},
|
["<leader>rR"] = { "<cmd> RustRunnables <CR>", "RustRunnables" },
|
||||||
["<leader>rd"] = { "<cmd> RustDebuggables <CR>", "RustDebuggables"},
|
["<leader>rd"] = { "<cmd> RustDebuggables <CR>", "RustDebuggables" },
|
||||||
["<leader>rha"] = { "<cmd> RustHoverActions <CR>", "RustHoverActions"},
|
["<leader>rha"] = { "<cmd> RustHoverActions <CR>", "RustHoverActions" },
|
||||||
["<leader>roc"] = { "<cmd> RustOpenCargo <CR>", "RustOpenCargo"},
|
["<leader>roc"] = { "<cmd> RustOpenCargo <CR>", "RustOpenCargo" },
|
||||||
["<leader>rcg"] = { "<cmd> RustViewCrateGraph <CR>", "RustViewCrateGraph"},
|
["<leader>rcg"] = { "<cmd> RustViewCrateGraph <CR>", "RustViewCrateGraph" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,5 +65,5 @@ local default_plugins = {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, plugin in pairs(default_plugins) do
|
for _, plugin in pairs(default_plugins) do
|
||||||
g["loaded_" .. plugin ] = 1
|
g["loaded_" .. plugin] = 1
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,7 @@ M.luasnip = function()
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||||
callback = function()
|
callback = function()
|
||||||
if
|
if require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
||||||
require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
|
|
||||||
and not require("luasnip").session.jump_active
|
and not require("luasnip").session.jump_active
|
||||||
then
|
then
|
||||||
require("luasnip").unlink_current()
|
require("luasnip").unlink_current()
|
||||||
|
|
@ -66,7 +65,7 @@ M.gitsigns = function()
|
||||||
gitsigns.setup(options)
|
gitsigns.setup(options)
|
||||||
end
|
end
|
||||||
|
|
||||||
M.crates = function ()
|
M.crates = function()
|
||||||
local present, crates = pcall(require, "crates")
|
local present, crates = pcall(require, "crates")
|
||||||
|
|
||||||
if not present then
|
if not present then
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ require('lualine').setup {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = 'auto',
|
theme = 'auto',
|
||||||
component_separators = { left = '', right = ''},
|
component_separators = { left = '', right = '' },
|
||||||
section_separators = { left = '', right = ''},
|
section_separators = { left = '', right = '' },
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
statusline = {},
|
statusline = {},
|
||||||
winbar = {},
|
winbar = {},
|
||||||
|
|
@ -18,18 +18,18 @@ require('lualine').setup {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {'mode'},
|
lualine_a = { 'mode' },
|
||||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||||
lualine_c = {'filename'},
|
lualine_c = { 'filename' },
|
||||||
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||||
lualine_y = {'progress'},
|
lualine_y = { 'progress' },
|
||||||
lualine_z = {'location'}
|
lualine_z = { 'location' }
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
lualine_b = {},
|
lualine_b = {},
|
||||||
lualine_c = {'filename'},
|
lualine_c = { 'filename' },
|
||||||
lualine_x = {'location'},
|
lualine_x = { 'location' },
|
||||||
lualine_y = {},
|
lualine_y = {},
|
||||||
lualine_z = {}
|
lualine_z = {}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ local plugins = {
|
||||||
config = function()
|
config = function()
|
||||||
require "plugins.configs.telescope"
|
require "plugins.configs.telescope"
|
||||||
end,
|
end,
|
||||||
setup = function ()
|
setup = function()
|
||||||
require ("core.utils").load_mappings "telescope"
|
require("core.utils").load_mappings "telescope"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -64,7 +64,7 @@ local plugins = {
|
||||||
|
|
||||||
["simrat39/rust-tools.nvim"] = {
|
["simrat39/rust-tools.nvim"] = {
|
||||||
after = "nvim-lspconfig",
|
after = "nvim-lspconfig",
|
||||||
config = function ()
|
config = function()
|
||||||
require("plugins.configs.rust-tools")
|
require("plugins.configs.rust-tools")
|
||||||
require("core.utils").load_mappings "rust"
|
require("core.utils").load_mappings "rust"
|
||||||
end,
|
end,
|
||||||
|
|
@ -72,7 +72,7 @@ local plugins = {
|
||||||
|
|
||||||
["Saecki/crates.nvim"] = {
|
["Saecki/crates.nvim"] = {
|
||||||
event = { "BufRead Cargo.toml" },
|
event = { "BufRead Cargo.toml" },
|
||||||
config = function ()
|
config = function()
|
||||||
require("plugins.configs.others").crates()
|
require("plugins.configs.others").crates()
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
@ -173,7 +173,7 @@ local plugins = {
|
||||||
|
|
||||||
["krolyxon/nvim-colorizer.lua"] = {
|
["krolyxon/nvim-colorizer.lua"] = {
|
||||||
opt = true,
|
opt = true,
|
||||||
setup = function ()
|
setup = function()
|
||||||
require("core.lazy_load").on_file_open "nvim-colorizer.lua"
|
require("core.lazy_load").on_file_open "nvim-colorizer.lua"
|
||||||
end,
|
end,
|
||||||
config = function()
|
config = function()
|
||||||
|
|
|
||||||
Reference in New Issue