updated the config files
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
vim.pack.add({
|
||||
{
|
||||
src = "https://github.com/rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
},
|
||||
})
|
||||
require("rose-pine").setup()
|
||||
|
||||
vim.pack.add({
|
||||
{
|
||||
src = "https://github.com/folke/tokyonight.nvim",
|
||||
name = "tokyo-night",
|
||||
},
|
||||
})
|
||||
|
||||
vim.pack.add({
|
||||
{
|
||||
src = "https://github.com/rebelot/kanagawa.nvim",
|
||||
name = "kanagawa",
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd("colorscheme kanagawa")
|
||||
@@ -0,0 +1,56 @@
|
||||
--options
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.wrap = true
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.updatetime = 200
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
|
||||
-- search
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = true
|
||||
|
||||
-- window splits
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
|
||||
-- keep the context around the cursor when scrolling
|
||||
vim.opt.scrolloff = 10
|
||||
|
||||
-- leader
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- keymappings
|
||||
local map = vim.keymap.set
|
||||
|
||||
map("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||
|
||||
-- window navigation
|
||||
map("n", "<C-h>", "<C-w>h")
|
||||
map("n", "<C-l>", "<C-w>l")
|
||||
map("n", "<C-j>", "<C-w>j")
|
||||
map("n", "<C-k>", "<C-w>k")
|
||||
|
||||
-- move selected lines up/down in visual mode
|
||||
map("v", "J", ":m '>+1<CR>gv=gv")
|
||||
map("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- keep cursor centred when jumping
|
||||
map("n", "<C-d>", "<C-d>zz")
|
||||
map("n", "<C-u>", "<C-u>zz")
|
||||
map("n", "n", "nzzzv")
|
||||
map("n", "N", "Nzzzv")
|
||||
|
||||
-- quickfix navigation (for build errors)
|
||||
map("n", "<leader>qo", "<cmd>copen<CR>")
|
||||
map("n", "<leader>qc", "<cmd>cclose<CR>")
|
||||
map("n", "]q", "<cmd>cnext<CR>")
|
||||
map("n", "[q", "<cmd>cprev<CR>")
|
||||
@@ -0,0 +1,18 @@
|
||||
-- Install mini.nvim
|
||||
vim.pack.add({ 'https://github.com/nvim-mini/mini.nvim' })
|
||||
|
||||
-- Fuzzy finder
|
||||
require('mini.pick').setup()
|
||||
|
||||
-- File explorer
|
||||
require('mini.files').setup()
|
||||
|
||||
-- Keymaps for the above
|
||||
local map = vim.keymap.set
|
||||
|
||||
map('n', '<M-O>', '<cmd>Pick files<CR>') -- find file
|
||||
map('n', '<M-S>', '<cmd>Pick grep_live<CR>') -- live grep
|
||||
map('n', '<M-B>', '<cmd>Pick buffers<CR>') -- buffer list
|
||||
map('n', '<leader>fe', MiniFiles.open) -- file explorer
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
lazy = false,
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
vim.cmd.colorscheme "catppuccin"
|
||||
end
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
return
|
||||
{
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = function()
|
||||
require("mason").setup({
|
||||
path = "append",
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup {
|
||||
ensure_installed = { "lua_ls" },
|
||||
}
|
||||
end
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.lua_ls.setup({})
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {})
|
||||
vim.keymap.set({'n', 'v'}, '<leader>ca', vim.lsp.buf.code_action, {})
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = function()
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
theme = 'catppuccin'
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set('n', '<leader>p', ':Neotree filesystem reveal left<CR>', {})
|
||||
end
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'nvim-telescope/telescope.nvim', tag = '0.1.5',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set('n', '<C-S-o>', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<C-S-s>', builtin.live_grep, {})
|
||||
end
|
||||
},
|
||||
{
|
||||
'nvim-telescope/telescope-ui-select.nvim',
|
||||
config = function()
|
||||
require("telescope").setup {
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- To get ui-select loaded and working with telescope, you need to call
|
||||
-- load_extension, somewhere after setup function:
|
||||
require("telescope").load_extension("ui-select")
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
return {
|
||||
-- "nvim-treesitter/nvim-treesitter",
|
||||
-- build = ":TSUpdate",
|
||||
-- config = function()
|
||||
-- local install = require("nvim-treesitter.install")
|
||||
-- local configs = require("nvim-treesitter.configs")
|
||||
|
||||
-- install = {
|
||||
-- compilers = { clang },
|
||||
-- prefer_git = false,
|
||||
-- }
|
||||
|
||||
-- configs.setup({
|
||||
-- ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "cmake", "query" },
|
||||
-- sync_install = false,
|
||||
-- highlight = { enable = true },
|
||||
-- indent = { enable = true },
|
||||
-- })
|
||||
-- end
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
vim.cmd("syntax on")
|
||||
vim.cmd("set expandtab")
|
||||
vim.cmd("set tabstop=4")
|
||||
vim.cmd("set softtabstop=4")
|
||||
vim.cmd("set shiftwidth=4")
|
||||
vim.cmd("set nu")
|
||||
|
||||
vim.g.mapleader = " "
|
||||
|
||||
Reference in New Issue
Block a user