Changes from fedora
This commit is contained in:
parent
4120893b8a
commit
66b4f96fdd
86
init.lua
86
init.lua
|
@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
||||||
vim.g.maplocalleader = ' '
|
vim.g.maplocalleader = ' '
|
||||||
|
|
||||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||||
vim.g.have_nerd_font = false
|
vim.g.have_nerd_font = true
|
||||||
|
|
||||||
-- [[ Setting options ]]
|
-- [[ Setting options ]]
|
||||||
-- See `:help vim.opt`
|
-- See `:help vim.opt`
|
||||||
|
@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
-- You can also add relative line numbers, to help with jumping.
|
-- You can also add relative line numbers, to help with jumping.
|
||||||
-- Experiment for yourself to see if you like it!
|
-- Experiment for yourself to see if you like it!
|
||||||
-- vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||||
vim.opt.mouse = 'a'
|
vim.opt.mouse = 'a'
|
||||||
|
@ -230,7 +230,6 @@ vim.opt.rtp:prepend(lazypath)
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
||||||
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
|
||||||
|
|
||||||
-- NOTE: Plugins can also be added by using a table,
|
-- NOTE: Plugins can also be added by using a table,
|
||||||
-- with the first argument being the link and the following
|
-- with the first argument being the link and the following
|
||||||
-- keys can be used to configure plugin behavior/loading/etc.
|
-- keys can be used to configure plugin behavior/loading/etc.
|
||||||
|
@ -607,7 +606,7 @@ require('lazy').setup({
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
-- clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
-- pyright = {},
|
pyright = {},
|
||||||
-- rust_analyzer = {},
|
-- rust_analyzer = {},
|
||||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||||
--
|
--
|
||||||
|
@ -829,13 +828,13 @@ require('lazy').setup({
|
||||||
-- change the command in the config to whatever the name of that colorscheme is.
|
-- change the command in the config to whatever the name of that colorscheme is.
|
||||||
--
|
--
|
||||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||||
'folke/tokyonight.nvim',
|
'olimorris/onedarkpro.nvim',
|
||||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||||
init = function()
|
init = function()
|
||||||
-- Load the colorscheme here.
|
-- Load the colorscheme here.
|
||||||
-- Like many other themes, this one has different styles, and you could load
|
-- Like many other themes, this one has different styles, and you could load
|
||||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||||
vim.cmd.colorscheme 'tokyonight-night'
|
vim.cmd.colorscheme 'onedark'
|
||||||
|
|
||||||
-- You can configure highlights by doing something like:
|
-- You can configure highlights by doing something like:
|
||||||
vim.cmd.hi 'Comment gui=none'
|
vim.cmd.hi 'Comment gui=none'
|
||||||
|
@ -907,7 +906,18 @@ require('lazy').setup({
|
||||||
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
|
||||||
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
|
||||||
},
|
},
|
||||||
|
-- neoscroll
|
||||||
|
{
|
||||||
|
'karb94/neoscroll.nvim',
|
||||||
|
config = function()
|
||||||
|
require('neoscroll').setup()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'ThePrimeagen/harpoon',
|
||||||
|
branch = 'harpoon2',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope.nvim' },
|
||||||
|
},
|
||||||
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
-- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
||||||
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
||||||
-- place them in the correct locations.
|
-- place them in the correct locations.
|
||||||
|
@ -954,3 +964,65 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- The line beneath this is called `modeline`. See `:help modeline`
|
-- The line beneath this is called `modeline`. See `:help modeline`
|
||||||
-- vim: ts=2 sts=2 sw=2 et
|
-- vim: ts=2 sts=2 sw=2 et
|
||||||
|
--
|
||||||
|
|
||||||
|
-- Harpoon keymaps
|
||||||
|
local harpoon = require 'harpoon'
|
||||||
|
harpoon:setup()
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>a', function()
|
||||||
|
harpoon:list():add()
|
||||||
|
end, { desc = 'Add file to harpoon list' })
|
||||||
|
vim.keymap.set('n', '<leader>h', function()
|
||||||
|
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||||
|
end, { desc = 'Toggle harpoon quick menu' })
|
||||||
|
vim.keymap.set('n', '<leader>1', function()
|
||||||
|
harpoon:list():select(1)
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<leader>2', function()
|
||||||
|
harpoon:list():select(2)
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<leader>3', function()
|
||||||
|
harpoon:list():select(3)
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<leader>4', function()
|
||||||
|
harpoon:list():select(4)
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<leader>5', function()
|
||||||
|
harpoon:list():select(5)
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Toggle previous & next buffers stored within Harpoon list
|
||||||
|
vim.keymap.set('n', '<C-S-P>', function()
|
||||||
|
harpoon:list():prev()
|
||||||
|
end)
|
||||||
|
vim.keymap.set('n', '<C-S-N>', function()
|
||||||
|
harpoon:list():next()
|
||||||
|
end)
|
||||||
|
|
||||||
|
local harpoon = require 'harpoon'
|
||||||
|
harpoon:setup {}
|
||||||
|
|
||||||
|
-- basic telescope configuration
|
||||||
|
local conf = require('telescope.config').values
|
||||||
|
local function toggle_telescope(harpoon_files)
|
||||||
|
local file_paths = {}
|
||||||
|
for _, item in ipairs(harpoon_files.items) do
|
||||||
|
table.insert(file_paths, item.value)
|
||||||
|
end
|
||||||
|
|
||||||
|
require('telescope.pickers')
|
||||||
|
.new({}, {
|
||||||
|
prompt_title = 'Harpoon',
|
||||||
|
finder = require('telescope.finders').new_table {
|
||||||
|
results = file_paths,
|
||||||
|
},
|
||||||
|
previewer = conf.file_previewer {},
|
||||||
|
sorter = conf.generic_sorter {},
|
||||||
|
})
|
||||||
|
:find()
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>h', function()
|
||||||
|
toggle_telescope(harpoon:list())
|
||||||
|
end, { desc = 'Open harpoon window' })
|
||||||
|
|
Loading…
Reference in New Issue