make config more minimal
This commit is contained in:
parent
21c5121c50
commit
2c5944f2c3
1 changed files with 13 additions and 61 deletions
74
init.lua
74
init.lua
|
|
@ -1,10 +1,9 @@
|
||||||
local opt = vim.opt
|
vim.opt.relativenumber = true
|
||||||
opt.relativenumber = true
|
|
||||||
vim.lsp.inlay_hint.enable = true
|
vim.lsp.inlay_hint.enable = true
|
||||||
opt.tabstop = 8
|
vim.opt.tabstop = 8
|
||||||
vim.opt.expandtab = true
|
vim.opt.expandtab = true
|
||||||
opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
opt.shiftwidth = 8
|
vim.opt.shiftwidth = 8
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
spacing = 4,
|
spacing = 4,
|
||||||
|
|
@ -21,33 +20,11 @@ vim.pack.add({
|
||||||
"https://github.com/vyfor/cord.nvim",
|
"https://github.com/vyfor/cord.nvim",
|
||||||
"https://github.com/nvim-mini/mini.nvim"
|
"https://github.com/nvim-mini/mini.nvim"
|
||||||
})
|
})
|
||||||
-- function to set colorsceme
|
|
||||||
require('tinted-nvim').setup({
|
|
||||||
ui = {
|
|
||||||
transparent = false
|
|
||||||
},
|
|
||||||
highlights = {
|
|
||||||
integrations = {
|
|
||||||
lualine = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
vim.cmd("colorscheme " .. vim.fn.system("cat /home/lucy/.local/share/tinted-theming/tinty/current_scheme"))
|
|
||||||
-- setup mini
|
|
||||||
require('mini.basics').setup()
|
|
||||||
require('mini.icons').setup()
|
|
||||||
require('mini.pick').setup()
|
|
||||||
require("lualine").setup({
|
require("lualine").setup({
|
||||||
options = {
|
|
||||||
section_separators = { left = "", right = "" },
|
|
||||||
component_separators = { left = "|", right = "|" },
|
|
||||||
globalstatus = true,
|
|
||||||
always_divide_middle = true,
|
|
||||||
},
|
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { "mode" },
|
lualine_a = { "mode" },
|
||||||
lualine_b = { "diagnostics" },
|
lualine_b = { "diagnostics" },
|
||||||
lualine_c = { "filename", "filesize", },
|
lualine_c = { "filename" },
|
||||||
lualine_x = { "lsp_status", "filetype" },
|
lualine_x = { "lsp_status", "filetype" },
|
||||||
lualine_y = { "" },
|
lualine_y = { "" },
|
||||||
lualine_z = { "location" },
|
lualine_z = { "location" },
|
||||||
|
|
@ -61,15 +38,15 @@ require("lualine").setup({
|
||||||
lualine_z = { 'tabs' }
|
lualine_z = { 'tabs' }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
require('tinted-nvim').setup({
|
||||||
-- setup superior lsp
|
selector = { enabled = true, mode = "cmd" },
|
||||||
vim.lsp.config("qml-language-server", {
|
|
||||||
cmd = { "qml-language-server" },
|
|
||||||
filetypes = { "qml" },
|
|
||||||
root_markers = { { "qmldir", "shell.qml" }, ".git" },
|
|
||||||
})
|
})
|
||||||
vim.lsp.enable("lua_ls")
|
require('mini.basics').setup()
|
||||||
|
require('mini.icons').setup()
|
||||||
|
require('mini.pick').setup()
|
||||||
|
|
||||||
|
vim.lsp.enable("lua_ls")
|
||||||
|
vim.lsp.enable("qmlls")
|
||||||
vim.lsp.enable("qml-language-server")
|
vim.lsp.enable("qml-language-server")
|
||||||
vim.lsp.enable("clangd")
|
vim.lsp.enable("clangd")
|
||||||
vim.lsp.enable("lua-language-server")
|
vim.lsp.enable("lua-language-server")
|
||||||
|
|
@ -79,33 +56,8 @@ require("cord").setup({
|
||||||
},
|
},
|
||||||
editor = { tooltip = "ur gay x3" },
|
editor = { tooltip = "ur gay x3" },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- keymaps
|
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
|
map("n", "<C-f>", function() vim.lsp.buf.format() end)
|
||||||
map("n", "<leader>ff", function()
|
|
||||||
MiniPick.builtin.files()
|
|
||||||
end)
|
|
||||||
map("n", "<leader>lg", function()
|
|
||||||
MiniPick.builtin.grep_live()
|
|
||||||
end)
|
|
||||||
|
|
||||||
map("n", "<C-h>", "<C-w>h")
|
|
||||||
map("n", "<C-j>", "<C-w>j")
|
|
||||||
map("n", "<C-k>", "<C-w>k")
|
|
||||||
map("n", "<C-l>", "<C-w>l")
|
|
||||||
map("n", "<C-S-Left>", ":vertical resize -5<CR>", { silent = true })
|
|
||||||
map("n", "<C-S-Right>", ":vertical resize +5<CR>", { silent = true })
|
|
||||||
map("n", "<C-S-Up>", ":resize +5<CR>", { silent = true })
|
|
||||||
map("n", "<C-S-Down>", ":resize -5<CR>", { silent = true })
|
|
||||||
-- lsp keybinds
|
|
||||||
map("n", "<C-f>", function()
|
|
||||||
vim.lsp.buf.format()
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- util keybinds
|
|
||||||
map("n", "<leader>t", "<cmd> terminal <cr>")
|
map("n", "<leader>t", "<cmd> terminal <cr>")
|
||||||
map("n", "<A-t>", "<cmd>Lspsaga term_toggle<cr>")
|
|
||||||
map("t", "<esc>", "<c-\\><c-n>")
|
map("t", "<esc>", "<c-\\><c-n>")
|
||||||
map("i", "<C-space>", "<C-X><C-O>")
|
map("i", "<C-space>", "<C-X><C-O>")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue