chore(config): add float term in neovim

main
sudo pacman -Syu 2022-06-24 16:04:11 +07:00
parent 9db61dd426
commit 5c1a569538
No known key found for this signature in database
GPG Key ID: D6CB5C6C567C47B0
1 changed files with 9 additions and 16 deletions

View File

@ -1,6 +1,3 @@
-- https://github.com/nanotee/nvim-lua-guide
-- https://neovim.io/doc/user/lua.html#lua-vim-options
vim.opt.breakindent = true vim.opt.breakindent = true
vim.opt.completeopt = { "menuone", "noinsert", "noselect" } vim.opt.completeopt = { "menuone", "noinsert", "noselect" }
vim.opt.number = true vim.opt.number = true
@ -12,11 +9,9 @@ vim.opt.virtualedit = "block"
vim.opt.whichwrap = "<,>,[,]" vim.opt.whichwrap = "<,>,[,]"
-- Clipboard support -- Clipboard support
-- https://neovim.io/doc/user/options.html#'clipboard'
vim.opt.clipboard:append({ "unnamedplus" }) vim.opt.clipboard:append({ "unnamedplus" })
-- Mouse support -- Mouse support
-- https://neovim.io/doc/user/options.html#'mouse'
vim.opt.mouse = "a" vim.opt.mouse = "a"
-- GUI support -- GUI support
@ -38,20 +33,17 @@ vim.keymap.set("i", "<C-c>", "<Esc>")
-- Disable showmode when use lualine -- Disable showmode when use lualine
vim.opt.showmode = false vim.opt.showmode = false
-- https://github.com/kyazdani42/nvim-tree.lua#setup -- NvimTree kepmap
vim.keymap.set("n", "<C-n>", ":NvimTreeToggle<CR>") vim.keymap.set("n", "<C-n>", ":NvimTreeToggle<CR>")
vim.keymap.set("n", "<leader>r", ":NvimTreeRefresh<CR>") vim.keymap.set("n", "<leader>r", ":NvimTreeRefresh<CR>")
vim.keymap.set("n", "<leader>n", ":NvimTreeFindFile<CR>") vim.keymap.set("n", "<leader>n", ":NvimTreeFindFile<CR>")
-- https://github.com/mvdan/gofumpt#vim-go -- Use gofumpt
vim.g.go_gopls_gofumpt = 1 vim.g.go_gopls_gofumpt = 1
-- https://github.com/junegunn/fzf/blob/master/README-VIM.md -- Use fzf
vim.opt.rtp:append({ "~/.fzf" }) vim.opt.rtp:append({ "~/.fzf" })
-- https://github.com/neovide/neovide/wiki/Configuration
vim.g.neovide_cursor_vfx_mode = "railgun"
-- https://github.com/wbthomason/packer.nvim -- https://github.com/wbthomason/packer.nvim
require("packer").startup(function() require("packer").startup(function()
-- Manage itself -- Manage itself
@ -69,6 +61,9 @@ require("packer").startup(function()
-- https://github.com/lukas-reineke/indent-blankline.nvim -- https://github.com/lukas-reineke/indent-blankline.nvim
use("lukas-reineke/indent-blankline.nvim") use("lukas-reineke/indent-blankline.nvim")
-- https://github.com/akinsho/toggleterm.nvim
use({ "akinsho/toggleterm.nvim", tag = "v1.*" })
-- Colorschemes -- Colorschemes
-- https://github.com/cocopon/iceberg.vim -- https://github.com/cocopon/iceberg.vim
use("cocopon/iceberg.vim") use("cocopon/iceberg.vim")
@ -84,7 +79,6 @@ require("packer").startup(function()
use("fatih/vim-go") use("fatih/vim-go")
end) end)
-- https://github.com/nvim-lualine/lualine.nvim#configuring-lualine-in-initvim
local lualine_theme = require("lualine.themes.iceberg") local lualine_theme = require("lualine.themes.iceberg")
if vim.env.COLORTERM == "truecolor" then if vim.env.COLORTERM == "truecolor" then
lualine_theme = require("lualine.themes.catppuccin") lualine_theme = require("lualine.themes.catppuccin")
@ -99,7 +93,6 @@ require("lualine").setup({
}, },
}) })
-- https://github.com/kyazdani42/nvim-tree.lua#setup
require("nvim-tree").setup({ require("nvim-tree").setup({
renderer = { renderer = {
icons = { icons = {
@ -120,10 +113,10 @@ require("nvim-tree").setup({
}, },
}) })
-- lukas-reineke/indent-blankline.nvim require("indent_blankline").setup()
require("indent_blankline").setup({})
require("toggleterm").setup()
-- https://github.com/catppuccin/nvim#setup
local catppuccin_term_colors = false local catppuccin_term_colors = false
if vim.env.COLORTERM == "truecolor" then if vim.env.COLORTERM == "truecolor" then
catppuccin_term_colors = true catppuccin_term_colors = true