Compare commits
2 Commits
6a624131e3
...
dfb75e565f
Author | SHA1 | Date |
---|---|---|
felixm | dfb75e565f | |
felixm | be5312ecb4 |
|
@ -1,3 +1,4 @@
|
|||
vim/plugged
|
||||
bin
|
||||
__pycache__
|
||||
.stversions
|
||||
|
|
|
@ -1,32 +1,30 @@
|
|||
require('gpt')
|
||||
require('mappings')
|
||||
require('config_lualine')
|
||||
require('config_mappings')
|
||||
require('config_telescope')
|
||||
require('config_treesitter')
|
||||
require('plugin_gpt')
|
||||
require('plugin_votion')
|
||||
require('plugins')
|
||||
require('telescope_config')
|
||||
require('lualine_config')
|
||||
require('votion')
|
||||
|
||||
-- Misc commands similar to my vimrc
|
||||
-- Global options
|
||||
vim.g.mapleader = ","
|
||||
vim.g.markdown_folding = 1
|
||||
|
||||
-- Options to make it similar to vimrc
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smarttab = true
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.api.nvim_set_keymap('i', 'jk', '<Esc>', {noremap = true})
|
||||
vim.cmd.colorscheme "catppuccin-frappe"
|
||||
vim.g.markdown_folding = 1
|
||||
vim.opt.title = true
|
||||
vim.opt.titlestring="nvim %f"
|
||||
|
||||
-- treesitter setup
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {"python", "lua", "rust"}, -- Install these parsers
|
||||
highlight = {
|
||||
enable = true, -- Enable syntax highlighting
|
||||
},
|
||||
textobjects = {
|
||||
enable = true
|
||||
}
|
||||
}
|
||||
vim.cmd.colorscheme "catppuccin-frappe"
|
||||
vim.api.nvim_set_keymap('i', 'jk', '<Esc>', {noremap = true})
|
||||
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.pyright.setup{}
|
||||
lspconfig.marksman.setup{}
|
||||
lspconfig.rust_analyzer.setup{}
|
||||
|
||||
require'lspconfig'.pyright.setup{}
|
||||
|
|
|
@ -18,7 +18,7 @@ wk.register({
|
|||
wk.register({
|
||||
b = {
|
||||
name = "buffer",
|
||||
q = { "<cmd>bdelete<cr>", "Quit" },
|
||||
q = { "<cmd>enew | bd #<CR>", "Quit" },
|
||||
n = { "<cmd>bnext<cr>", "Next" },
|
||||
p = { "<cmd>bprevious<cr>", "Prev" },
|
||||
a = { "<cmd>unhide<cr>", "Show All" },
|
||||
|
@ -63,3 +63,34 @@ wk.register({
|
|||
d = { "<cmd>VotionDelete<cr>", "Delete" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
|
||||
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
require("which-key").register({
|
||||
l = {
|
||||
name = "LSP",
|
||||
D = { "<cmd>lua vim.lsp.buf.declaration()<CR>", "Go to declaration" },
|
||||
d = { "<cmd>lua vim.lsp.buf.definition()<CR>", "Go to definition" },
|
||||
K = { "<cmd>lua vim.lsp.buf.hover()<CR>", "Show hover" },
|
||||
i = { "<cmd>lua vim.lsp.buf.implementation()<CR>", "Go to implementation" },
|
||||
k = { "<cmd>lua vim.lsp.buf.signature_help()<CR>", "Show signature help" },
|
||||
-- a = { "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", "Add workspace folder" },
|
||||
-- r = { "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", "Remove workspace folder" },
|
||||
-- l = { "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", "List workspace folders" },
|
||||
t = { "<cmd>lua vim.lsp.buf.type_definition()<CR>", "Go to type definition" },
|
||||
r = { "<cmd>lua vim.lsp.buf.rename()<CR>", "Rename" },
|
||||
c = { "<cmd>lua vim.lsp.buf.code_action()<CR>", "Code action" },
|
||||
r = { "<cmd>lua vim.lsp.buf.references()<CR>", "Show references" },
|
||||
f = { "<cmd>lua vim.diagnostic.open_float()<CR>", "Diagnostics float" },
|
||||
p = { "<cmd>lua vim.diagnostic.goto_prev()<CR>", "Go to prev error" },
|
||||
n = { "<cmd>lua vim.diagnostic.goto_next()<CR>", "Go to next error" },
|
||||
l = { "<cmd>lua vim.diagnostic.setloclist()<CR>", "Set location list" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
end,
|
||||
})
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = {"python", "lua", "rust", "markdown", "c"}, -- Install these parsers
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false
|
||||
},
|
||||
textobjects = {
|
||||
enable = true
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
-- the root location of the votion database all MD files in this directory
|
||||
-- and it's subdirectories are part of the database.
|
||||
-- Set votion_directory
|
||||
local votion_directory = vim.fn.expand("~") .. "/owc/vault"
|
||||
local votion_directory = vim.fn.expand("~") .. "/owc"
|
||||
local actions = require("telescope.actions")
|
||||
|
||||
function votion_new()
|
|
@ -1,7 +1,11 @@
|
|||
return require('packer').startup(function(use)
|
||||
use 'wbthomason/packer.nvim'
|
||||
use "wbthomason/packer.nvim"
|
||||
use 'nvim-tree/nvim-web-devicons'
|
||||
use 'hoob3rt/lualine.nvim'
|
||||
use 'neovim/nvim-lspconfig'
|
||||
|
||||
use { 'nvim-treesitter/nvim-treesitter' }
|
||||
use { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" }
|
||||
use { "nvim-treesitter/nvim-treesitter-textobjects" }
|
||||
use { "catppuccin/nvim", name = "catppuccin" }
|
||||
|
||||
use {
|
||||
|
@ -16,14 +20,10 @@ return require('packer').startup(function(use)
|
|||
vim.o.timeoutlen = 300
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
use {
|
||||
'stevearc/oil.nvim',
|
||||
config = function() require('oil').setup() end
|
||||
}
|
||||
|
||||
use 'nvim-tree/nvim-web-devicons'
|
||||
use 'hoob3rt/lualine.nvim'
|
||||
use 'neovim/nvim-lspconfig'
|
||||
|
||||
end)
|
||||
|
|
|
@ -74,16 +74,31 @@ end
|
|||
time([[try_loadstring definition]], false)
|
||||
time([[Defining packer_plugins]], true)
|
||||
_G.packer_plugins = {
|
||||
["lualine.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||
url = "https://github.com/hoob3rt/lualine.nvim"
|
||||
},
|
||||
nvim = {
|
||||
loaded = true,
|
||||
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/nvim",
|
||||
url = "https://github.com/catppuccin/nvim"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
loaded = true,
|
||||
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||
url = "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
["nvim-treesitter"] = {
|
||||
loaded = true,
|
||||
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||
},
|
||||
["nvim-treesitter-textobjects"] = {
|
||||
loaded = true,
|
||||
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects",
|
||||
url = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects"
|
||||
},
|
||||
["nvim-web-devicons"] = {
|
||||
loaded = true,
|
||||
path = "/home/felixm/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||
|
|
|
@ -38,13 +38,13 @@ def window_tabs():
|
|||
length_per_title = 90 // len(titles)
|
||||
for i in range(len(titles)):
|
||||
titles[i] = titles[i].replace("— Mozilla Firefox", "")
|
||||
titles[i] = titles[i].replace("- Chromium", "")
|
||||
titles[i] = titles[i].replace("&", "")
|
||||
titles[i] = titles[i][:length_per_title]
|
||||
|
||||
# Show selected text with color 'colors.TEXT'
|
||||
if selected_index != -1:
|
||||
titles[
|
||||
selected_index
|
||||
] = f'<span foreground="{TEXT}">{titles[selected_index]}</span>'
|
||||
titles[selected_index] = f'<span foreground="{TEXT}">{titles[selected_index]}</span>'
|
||||
|
||||
text = " | ".join(titles)
|
||||
return text
|
||||
|
|
|
@ -91,6 +91,5 @@
|
|||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"workbench.startupEditor": "none",
|
||||
"window.menuBarVisibility": "toggle"
|
||||
"workbench.startupEditor": "none"
|
||||
}
|
||||
|
|
|
@ -26,9 +26,8 @@ alias private-session='export SAVEHIST=0 && export HISTSIZE=0'
|
|||
alias icat="kitty +kitten icat"
|
||||
|
||||
# votion
|
||||
alias vt="vim -c RgVotionTitle"
|
||||
alias vn="vim -c \":call votion#votion#Note()\""
|
||||
alias vj="vim -c \":call votion#votion#Journal()\""
|
||||
alias vt="nvim -c VotionOpen"
|
||||
alias vj="daily-journal"
|
||||
|
||||
# Set to this to use case-sensitive completion
|
||||
# CASE_SENSITIVE="true"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
,alacritty,"nice terminal emulator."
|
||||
,acpi,"is a client for battery, power, and thermal readings."
|
||||
,alsa-utils,"for audio tools."
|
||||
,arandr,"allows the user to customize monitor arrangements."
|
||||
,base-devel,"includes basic system tools."
|
||||
,bat,"can highlight code output and display files."
|
||||
,brightnessctl,"adjust screen brightness."
|
||||
,calibre,"for nice ebook reading."
|
||||
|
@ -12,9 +14,11 @@
|
|||
,fzf,"is a fuzzy finder tool."
|
||||
,gnome-keyring,"serves as the system keyring."
|
||||
,i3lock,"allows you to lock your computer, and quickly unlock with your password."
|
||||
,inetutils,"includes hostname which our zshrc needs."
|
||||
,keepassxc,"is a password manager."
|
||||
,kitty,"other nice terminal emulator."
|
||||
,man-db,"lets you read man pages of programs."
|
||||
,marksman,"is a markdown language server."
|
||||
,mediainfo,"shows audio and video information."
|
||||
,moreutils,"is a collection of useful unix tools."
|
||||
,mpv,"is the patrician's choice video player."
|
||||
|
@ -22,6 +26,7 @@
|
|||
,noto-fonts-emoji,"is an emoji font."
|
||||
,ntp,"for time synchronization."
|
||||
,pacman,"clearly our package manager."
|
||||
,pacman-contrib,"additional stuff for pacman."
|
||||
,pasystray,"provides a system tray for volume control."
|
||||
,pipewire,"is the audio system."
|
||||
,pipewire-pulse,"gives pipewire compatibility with PulseAudio programs."
|
||||
|
@ -31,6 +36,7 @@
|
|||
,qtile,"is the window manager I use nowadays."
|
||||
,rigrep,"is an ultra fast version of grep written in Rust."
|
||||
,rofi,"is a launcher that sucks more than dmenu."
|
||||
,rofi-emoji,"because emojis make life prettier."
|
||||
,ttf-jetbrains-mono-nerd,"for some nice font symbols."
|
||||
,unclutter,"hides an inactive mouse."
|
||||
,unzip,"unzips zips."
|
||||
|
|
|
Loading…
Reference in New Issue