126 lines
3.7 KiB
Lua
126 lines
3.7 KiB
Lua
vim.g.mapleader = " "
|
|
vim.opt.relativenumber = true
|
|
vim.lsp.inlay_hint.enable = true
|
|
vim.opt.tabstop = 8
|
|
vim.opt.expandtab = true
|
|
vim.opt.swapfile = false
|
|
vim.opt.shiftwidth = 8
|
|
vim.diagnostic.config({
|
|
virtual_text = {
|
|
spacing = 4,
|
|
source = true,
|
|
},
|
|
})
|
|
vim.lsp.enable("lua_ls")
|
|
vim.lsp.enable("qmlls")
|
|
vim.lsp.enable("clangd")
|
|
vim.lsp.enable("lua-language-server")
|
|
-- add plugins
|
|
vim.pack.add({
|
|
"https://github.com/nvim-treesitter/nvim-treesitter",
|
|
"https://github.com/saghen/blink.lib",
|
|
"https://github.com/saghen/blink.cmp.git",
|
|
"https://github.com/saghen/blink.indent",
|
|
'https://github.com/nvim-tree/nvim-web-devicons',
|
|
"https://github.com/nvim-lualine/lualine.nvim",
|
|
"https://github.com/tinted-theming/tinted-nvim.git",
|
|
"https://github.com/nvim-telescope/telescope.nvim.git",
|
|
"https://github.com/nvim-lua/plenary.nvim.git",
|
|
"https://github.com/romgrk/barbar.nvim.git",
|
|
"https://github.com/sschleemilch/slimline.nvim",
|
|
"https://github.com/mason-org/mason.nvim",
|
|
"https://github.com/neovim/nvim-lspconfig",
|
|
"https://github.com/vyfor/cord.nvim",
|
|
})
|
|
require('mason').setup()
|
|
require('telescope').setup()
|
|
require('barbar').setup({
|
|
animation = false,
|
|
tabpages = true,
|
|
icons = {
|
|
buffer_index = true,
|
|
},
|
|
})
|
|
require('tinted-nvim').setup({
|
|
default_scheme = "base16-catppuccin-mocha",
|
|
selector = { enabled = true, mode = "cmd" },
|
|
ui = {
|
|
transparent = true,
|
|
}
|
|
})
|
|
require('blink.cmp').build():pwait()
|
|
require('blink.cmp').setup()
|
|
require('blink.indent').setup({
|
|
scope = {
|
|
enabled = true,
|
|
underline = {
|
|
enabled = true,
|
|
},
|
|
}
|
|
})
|
|
require("cord").setup({
|
|
display = {
|
|
theme = "atom",
|
|
},
|
|
editor = { tooltip = "ur gay x3" },
|
|
})
|
|
require('slimline').setup({
|
|
spaces = {
|
|
components = " ",
|
|
left = "",
|
|
right = "",
|
|
},
|
|
components = {
|
|
left = {
|
|
'mode',
|
|
'path',
|
|
'diagnostics',
|
|
},
|
|
right = {
|
|
'filetype_lsp',
|
|
'progress',
|
|
},
|
|
},
|
|
sep = {
|
|
hide = {
|
|
first = true, -- hides the first separator of the line
|
|
last = true, -- hides the last separator of the line
|
|
},
|
|
left = " ",
|
|
right = " ",
|
|
},
|
|
style = 'fg',
|
|
bold = false,
|
|
hl = {
|
|
primary = 'StatusLine',
|
|
secondary = 'StatusLineNC',
|
|
base = 'StatusLine',
|
|
base_inactive = 'StatusLineNC',
|
|
},
|
|
configs = {
|
|
mode = {
|
|
verbose = true,
|
|
},
|
|
path = {
|
|
},
|
|
progress = {
|
|
follow = 'mode',
|
|
},
|
|
filetype_lsp = {
|
|
hl = {
|
|
primary = 'String',
|
|
secondary = 'Function',
|
|
},
|
|
},
|
|
},
|
|
})
|
|
local map = vim.keymap.set
|
|
for i = 1, 10 do
|
|
map("n", "<A-" .. i .. ">", "<cmd> BufferGoto " .. i .. "<cr>")
|
|
end
|
|
|
|
map("n", "<C-f>", function() vim.lsp.buf.format() end)
|
|
map("n", "<leader>ff", "<cmd> Telescope find_files<cr>")
|
|
map("n", "<leader>t", "<cmd> terminal <cr>")
|
|
map("t", "<esc>", "<c-\\><c-n>")
|
|
map("n", "<leader>w", "<cmd> bdelete! <cr>")
|