my changes
This commit is contained in:
parent
21691297f2
commit
c38462c0d2
6 changed files with 54 additions and 23 deletions
|
@ -1,4 +1,9 @@
|
|||
local colorscheme = "tokyonight-night"
|
||||
--require("catppuccin").setup()
|
||||
--vim.cmd [[colorscheme catppuccin]]
|
||||
|
||||
--local colorscheme = "tokyonight-night"
|
||||
vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha
|
||||
local colorscheme = "catppuccin"
|
||||
|
||||
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
|
||||
if not status_ok then
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
local enabled = false
|
||||
local status_ok, indent_blankline = pcall(require, "indent_blankline")
|
||||
if not status_ok then
|
||||
if (not enabled) or (not status_ok) then
|
||||
return
|
||||
end
|
||||
|
||||
indent_blankline.setup {
|
||||
char = "▏",
|
||||
show_trailing_blankline_indent = false,
|
||||
show_first_indent_level = true,
|
||||
use_treesitter = true,
|
||||
show_current_context = true,
|
||||
buftype_exclude = { "terminal", "nofile" },
|
||||
filetype_exclude = {
|
||||
"help",
|
||||
"packer",
|
||||
"NvimTree",
|
||||
},
|
||||
}
|
||||
--indent_blankline.setup {
|
||||
-- char = "▏",
|
||||
-- show_trailing_blankline_indent = false,
|
||||
-- show_first_indent_level = true,
|
||||
-- use_treesitter = true,
|
||||
-- show_current_context = true,
|
||||
-- buftype_exclude = { "terminal", "nofile" },
|
||||
-- filetype_exclude = {
|
||||
-- "help",
|
||||
-- "packer",
|
||||
-- "NvimTree",
|
||||
-- },
|
||||
--}
|
||||
|
|
|
@ -31,19 +31,27 @@ keymap("n", "<C-Right>", ":vertical resize +2<CR>", opts)
|
|||
-- Navigate buffers
|
||||
keymap("n", "<S-l>", ":bnext<CR>", opts)
|
||||
keymap("n", "<S-h>", ":bprevious<CR>", opts)
|
||||
for _, mode in ipairs({"n", "i", "v"}) do
|
||||
vim.keymap.set(mode, '<A-1>', "<Cmd>BufferLineGoToBuffer 1<CR>", { noremap = true, silent = true })
|
||||
vim.keymap.set(mode, '<A-2>', "<Cmd>BufferLineGoToBuffer 2<CR>", { noremap = true, silent = true })
|
||||
vim.keymap.set(mode, '<A-3>', "<Cmd>BufferLineGoToBuffer 3<CR>", { noremap = true, silent = true })
|
||||
vim.keymap.set(mode, '<A-4>', "<Cmd>BufferLineGoToBuffer 4<CR>", { noremap = true, silent = true })
|
||||
vim.keymap.set(mode, '<A-5>', "<Cmd>BufferLineGoToBuffer 5<CR>", { noremap = true, silent = true })
|
||||
end
|
||||
|
||||
|
||||
-- Clear highlights
|
||||
keymap("n", "<leader>h", "<cmd>nohlsearch<CR>", opts)
|
||||
|
||||
-- Close buffers
|
||||
keymap("n", "<S-q>", "<cmd>Bdelete!<CR>", opts)
|
||||
keymap("n", "<S-q>", "<cmd>Bdelete<CR>", opts)
|
||||
|
||||
-- Better paste
|
||||
keymap("v", "p", '"_dP', opts)
|
||||
|
||||
-- Insert --
|
||||
-- Press jk fast to enter
|
||||
keymap("i", "jk", "<ESC>", opts)
|
||||
--keymap("i", "jk", "<ESC>", opts)
|
||||
|
||||
-- Visual --
|
||||
-- Stay in indent mode
|
||||
|
@ -62,7 +70,7 @@ keymap("n", "<leader>fp", ":Telescope projects<CR>", opts)
|
|||
keymap("n", "<leader>fb", ":Telescope buffers<CR>", opts)
|
||||
|
||||
-- Git
|
||||
keymap("n", "<leader>gg", "<cmd>lua _LAZYGIT_TOGGLE()<CR>", opts)
|
||||
--keymap("n", "<leader>gg", "<cmd>lua _LAZYGIT_TOGGLE()<CR>", opts)
|
||||
|
||||
-- Comment
|
||||
keymap("n", "<leader>/", "<cmd>lua require('Comment.api').toggle_current_linewise()<CR>", opts)
|
||||
|
|
|
@ -7,6 +7,7 @@ local servers = {
|
|||
"bashls",
|
||||
"jsonls",
|
||||
"yamlls",
|
||||
"rust_analyzer",
|
||||
}
|
||||
|
||||
local settings = {
|
||||
|
|
|
@ -21,14 +21,14 @@ vim.opt.undofile = true -- enable persistent undo
|
|||
vim.opt.updatetime = 300 -- faster completion (4000ms default)
|
||||
vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited
|
||||
vim.opt.expandtab = true -- convert tabs to spaces
|
||||
vim.opt.shiftwidth = 2 -- the number of spaces inserted for each indentation
|
||||
vim.opt.tabstop = 2 -- insert 2 spaces for a tab
|
||||
vim.opt.shiftwidth = 4 -- the number of spaces inserted for each indentation
|
||||
vim.opt.tabstop = 4 -- insert 2 spaces for a tab
|
||||
vim.opt.cursorline = true -- highlight the current line
|
||||
vim.opt.number = true -- set numbered lines
|
||||
vim.opt.laststatus = 3 -- only the last window will always have a status line
|
||||
vim.opt.showcmd = false -- hide (partial) command in the last line of the screen (for performance)
|
||||
vim.opt.showcmd = true -- hide (partial) command in the last line of the screen (for performance)
|
||||
vim.opt.ruler = false -- hide the line and column number of the cursor position
|
||||
vim.opt.numberwidth = 4 -- minimal number of columns to use for the line number {default 4}
|
||||
--vim.opt.numberwidth = 4 -- minimal number of columns to use for the line number {default 4}
|
||||
vim.opt.signcolumn = "yes" -- always show the sign column, otherwise it would shift the text each time
|
||||
vim.opt.wrap = false -- display lines as one long line
|
||||
vim.opt.scrolloff = 8 -- minimal number of screen lines to keep above and below the cursor
|
||||
|
|
|
@ -57,12 +57,13 @@ return packer.startup(function(use)
|
|||
use { "akinsho/toggleterm.nvim", commit = "2a787c426ef00cb3488c11b14f5dcf892bbd0bda" }
|
||||
use { "ahmedkhalf/project.nvim", commit = "628de7e433dd503e782831fe150bb750e56e55d6" }
|
||||
use { "lewis6991/impatient.nvim", commit = "b842e16ecc1a700f62adb9802f8355b99b52a5a6" }
|
||||
use { "lukas-reineke/indent-blankline.nvim", commit = "db7cbcb40cc00fc5d6074d7569fb37197705e7f6" }
|
||||
--use { "lukas-reineke/indent-blankline.nvim", commit = "db7cbcb40cc00fc5d6074d7569fb37197705e7f6" }
|
||||
use { "goolord/alpha-nvim", commit = "0bb6fc0646bcd1cdb4639737a1cee8d6e08bcc31" }
|
||||
|
||||
-- Colorschemes
|
||||
use { "folke/tokyonight.nvim", commit = "66bfc2e8f754869c7b651f3f47a2ee56ae557764" }
|
||||
use { "lunarvim/darkplus.nvim", commit = "13ef9daad28d3cf6c5e793acfc16ddbf456e1c83" }
|
||||
use { "catppuccin/nvim", as = "catppuccin" }
|
||||
|
||||
-- cmp plugins
|
||||
use { "hrsh7th/nvim-cmp", commit = "b0dff0ec4f2748626aae13f011d1a47071fe9abc" } -- The completion plugin
|
||||
|
@ -101,6 +102,21 @@ return packer.startup(function(use)
|
|||
use { "rcarriga/nvim-dap-ui", commit = "d76d6594374fb54abf2d94d6a320f3fd6e9bb2f7" }
|
||||
use { "ravenxrz/DAPInstall.nvim", commit = "8798b4c36d33723e7bba6ed6e2c202f84bb300de" }
|
||||
|
||||
use {
|
||||
"klen/nvim-config-local",
|
||||
config = function()
|
||||
require('config-local').setup {
|
||||
-- Default configuration (optional)
|
||||
config_files = { ".nvimrc.lua" }, -- Config file patterns to load (lua supported)
|
||||
hashfile = vim.fn.stdpath("data") .. "/config-local", -- Where the plugin keeps files data
|
||||
autocommands_create = false, -- Create autocommands (VimEnter, DirectoryChanged)
|
||||
commands_create = false, -- Create commands (ConfigSource, ConfigEdit, ConfigTrust, ConfigIgnore)
|
||||
silent = true, -- Disable plugin messages (Config loaded/ignored)
|
||||
lookup_parents = false, -- Lookup config files in parent directories
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
if PACKER_BOOTSTRAP then
|
||||
|
|
Loading…
Reference in a new issue