nvim coc
This commit is contained in:
@@ -32,5 +32,17 @@
|
||||
"folder": " ",
|
||||
"file": " ",
|
||||
"interface": " "
|
||||
}
|
||||
},
|
||||
"coc.source.OmniSharp.enable": true,
|
||||
"omnisharp.trace.server": "information",
|
||||
"omnisharp.debug.server": true,
|
||||
"omnisharp.path": "/usr/local/bin/omnisharp",
|
||||
"diagnostic.enableMessage": "never",
|
||||
"diagnostic.enable": true,
|
||||
"diagnostic.errorSign": "✗",
|
||||
"diagnostic.warningSign": "⚠",
|
||||
"diagnostic.infoSign": "ℹ",
|
||||
"diagnostic.hintSign": "➤",
|
||||
"diagnostic.virtualText": true,
|
||||
"diagnostic.virtualTextCurrentLineOnly": true
|
||||
}
|
||||
|
||||
@@ -196,6 +196,27 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
group = "GoKeybindings",
|
||||
})
|
||||
|
||||
if vim.env.TMUX ~= nil then
|
||||
-- Define an autocommand for BufEnter and FocusGained events
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained" }, {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
local current_file = vim.fn.expand("%:t")
|
||||
local tmux_command = string.format("tmux rename-window '📄 nvim - %s'", current_file)
|
||||
vim.fn.system(tmux_command)
|
||||
end
|
||||
})
|
||||
|
||||
-- Define an autocommand for the VimLeave event
|
||||
vim.api.nvim_create_autocmd("VimLeave", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
local shell = vim.env.SHELL or "sh"
|
||||
vim.fn.system("tmux set-window-option automatic-rename on")
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
-- Nvim Tree
|
||||
vim.keymap.set("n", "<leader>n", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle Nvim Tree" })
|
||||
|
||||
@@ -543,17 +564,20 @@ require("lazy").setup({
|
||||
},
|
||||
|
||||
-- LSP Plugins
|
||||
--{ "dense-analysis/ale" },
|
||||
{
|
||||
"neoclide/coc.nvim",
|
||||
branch = "release",
|
||||
config = function()
|
||||
-- Key mappings for coc.nvim in insert mode
|
||||
vim.keymap.set("i", "<TAB>", "pumvisible() ? coc#_select_confirm() : '<TAB>'", { expr = true, noremap = true, silent = true })
|
||||
vim.keymap.set("i", "<C-j>", [[coc#pum#visible() ? coc#pum#next(1) : "\<C-j>"]], { expr = true, noremap = true, silent = true, replace_keycodes = false })
|
||||
vim.keymap.set("i", "<C-k>", [[coc#pum#visible() ? coc#pum#prev(1) : "\<C-k>"]], { expr = true, noremap = true, silent = true, replace_keycodes = false })
|
||||
vim.keymap.set("i", "<TAB>", "pumvisible() ? coc#_select_confirm() : '<TAB>'",
|
||||
{ expr = true, noremap = true, silent = true })
|
||||
vim.keymap.set("i", "<C-j>", [[coc#pum#visible() ? coc#pum#next(1) : "\<C-j>"]],
|
||||
{ expr = true, noremap = true, silent = true, replace_keycodes = false })
|
||||
vim.keymap.set("i", "<C-k>", [[coc#pum#visible() ? coc#pum#prev(1) : "\<C-k>"]],
|
||||
{ expr = true, noremap = true, silent = true, replace_keycodes = false })
|
||||
-- Disable Enter key for confirming completion
|
||||
vim.keymap.set("i", "<CR>", "pumvisible() ? coc#_cancel() : '<CR>'", { expr = true, noremap = true, silent = true })
|
||||
|
||||
end
|
||||
},
|
||||
{
|
||||
|
||||
+79
-17
@@ -1,24 +1,86 @@
|
||||
# ~/.tmux.conf
|
||||
|
||||
# Options to make tmux more pleasant
|
||||
set-option -sa terminal-overrides ",xterm*:Tc"
|
||||
set -g mouse on
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -a terminal-features 'xterm-256color:RGB'
|
||||
|
||||
# Configure the catppuccin plugin
|
||||
set -g @catppuccin_flavor "mocha"
|
||||
unbind C-b
|
||||
set -g prefix C-Space
|
||||
bind C-Space send-prefix
|
||||
|
||||
# Spawn a new window (tab equivalent)
|
||||
bind -n M-c new-window
|
||||
|
||||
# Close the current pane
|
||||
bind -n M-x kill-pane
|
||||
|
||||
# Switch to the previous window (tab equivalent)
|
||||
bind -n M-b previous-window
|
||||
|
||||
# Switch to the next window (tab equivalent)
|
||||
bind -n M-n next-window
|
||||
|
||||
# Split the window horizontally
|
||||
bind -n M-v split-window -h
|
||||
|
||||
# Split the window vertically
|
||||
bind -n M-g split-window -v
|
||||
|
||||
# Activate the pane on the left
|
||||
bind -n M-h select-pane -L
|
||||
|
||||
# Activate the pane below
|
||||
bind -n M-j select-pane -D
|
||||
|
||||
# Activate the pane above
|
||||
bind -n M-k select-pane -U
|
||||
|
||||
# Activate the pane on the right
|
||||
bind -n M-l select-pane -R
|
||||
|
||||
# Resize the pane to the left
|
||||
bind -n M-Left resize-pane -L 5
|
||||
|
||||
# Resize the pane to the right
|
||||
bind -n M-Right resize-pane -R 5
|
||||
|
||||
# Resize the pane down
|
||||
bind -n M-Down resize-pane -D 5
|
||||
|
||||
# Resize the pane up
|
||||
bind -n M-Up resize-pane -U 5
|
||||
|
||||
|
||||
# Start windows and panes at 1, not 0
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||
#set -g @plugin 'catppuccin/tmux'
|
||||
#set -g @plugin 'dreamsofcode-io/catppuccin-tmux'
|
||||
set -g @plugin 'wooshdude/catppuccin-tmux'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
|
||||
set -g @catppuccin_flavour 'mocha'
|
||||
set -g @catppuccin_window_status_style "rounded"
|
||||
|
||||
# Load catppuccin
|
||||
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
|
||||
# For TPM, instead use `run ~/.config/tmux/plugins/tmux/catppuccin.tmux`
|
||||
|
||||
# Make the status line pretty and add some modules
|
||||
set -g status-right-length 100
|
||||
set -g status-left-length 100
|
||||
set -g status-left ""
|
||||
set -g status-right "#{E:@catppuccin_date_time}"
|
||||
set -g @catppuccin_window_current_number_color "#{@thm_magenta}"
|
||||
|
||||
run ~/.config/tmux/plugins/tmux-plugins/tmux-cpu/cpu.tmux
|
||||
run ~/.config/tmux/plugins/tmux-plugins/tmux-battery/battery.tmux
|
||||
# Or, if using TPM, just run TPM
|
||||
#set -g @catppuccin_status_middle_separator ""
|
||||
set -g @catppuccin_status_right_separator ""
|
||||
set -g @catppuccin_status_left_separator ""
|
||||
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
# set vi-mode
|
||||
set-window-option -g mode-keys vi
|
||||
# keybindings
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||
|
||||
bind '"' split-window -v -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
|
||||
+70
-70
@@ -20,76 +20,76 @@ config.window_decorations = "RESIZE"
|
||||
|
||||
-- tmux
|
||||
config.keys = {
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "c",
|
||||
action = wezterm.action.SpawnTab("CurrentPaneDomain"),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "x",
|
||||
action = wezterm.action.CloseCurrentPane({ confirm = false }),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "b",
|
||||
action = wezterm.action.ActivateTabRelative(-1),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "n",
|
||||
action = wezterm.action.ActivateTabRelative(1),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "v",
|
||||
action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "g",
|
||||
action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "h",
|
||||
action = wezterm.action.ActivatePaneDirection("Left"),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "j",
|
||||
action = wezterm.action.ActivatePaneDirection("Down"),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "k",
|
||||
action = wezterm.action.ActivatePaneDirection("Up"),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "l",
|
||||
action = wezterm.action.ActivatePaneDirection("Right"),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "LeftArrow",
|
||||
action = wezterm.action.AdjustPaneSize({ "Left", 5 }),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "RightArrow",
|
||||
action = wezterm.action.AdjustPaneSize({ "Right", 5 }),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "DownArrow",
|
||||
action = wezterm.action.AdjustPaneSize({ "Down", 5 }),
|
||||
},
|
||||
{
|
||||
mods = "ALT",
|
||||
key = "UpArrow",
|
||||
action = wezterm.action.AdjustPaneSize({ "Up", 5 }),
|
||||
},
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "c",
|
||||
-- action = wezterm.action.SpawnTab("CurrentPaneDomain"),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "x",
|
||||
-- action = wezterm.action.CloseCurrentPane({ confirm = false }),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "b",
|
||||
-- action = wezterm.action.ActivateTabRelative(-1),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "n",
|
||||
-- action = wezterm.action.ActivateTabRelative(1),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "v",
|
||||
-- action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "g",
|
||||
-- action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "h",
|
||||
-- action = wezterm.action.ActivatePaneDirection("Left"),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "j",
|
||||
-- action = wezterm.action.ActivatePaneDirection("Down"),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "k",
|
||||
-- action = wezterm.action.ActivatePaneDirection("Up"),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "l",
|
||||
-- action = wezterm.action.ActivatePaneDirection("Right"),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "LeftArrow",
|
||||
-- action = wezterm.action.AdjustPaneSize({ "Left", 5 }),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "RightArrow",
|
||||
-- action = wezterm.action.AdjustPaneSize({ "Right", 5 }),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "DownArrow",
|
||||
-- action = wezterm.action.AdjustPaneSize({ "Down", 5 }),
|
||||
-- },
|
||||
-- {
|
||||
-- mods = "ALT",
|
||||
-- key = "UpArrow",
|
||||
-- action = wezterm.action.AdjustPaneSize({ "Up", 5 }),
|
||||
-- },
|
||||
}
|
||||
|
||||
config.window_padding = {
|
||||
|
||||
Reference in New Issue
Block a user