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