1
0
Fork 0

idc changed a lot of files

This commit is contained in:
Arthur Khachaturov 2024-11-28 22:19:16 +03:00
parent 628baf3eea
commit 94d2955ab0
No known key found for this signature in database
GPG key ID: CAC2B7EB6DF45D55
31 changed files with 267 additions and 80 deletions

View file

@ -1,4 +1,5 @@
-- Remap leader key to <Space>
-- Useful tools for lua
Utils = require('utils')
-- Load basic configuration
require("config")

View file

@ -0,0 +1,40 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "45db5addf8d0a201e1cf247cae4cdce605ad3768" },
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
"bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" },
"indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" },
"iptables": { "branch": "master", "commit": "0d18b1e468f547dd7e2c494d42bc134a1e0eac7e" },
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
"lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"nvim-autopairs": { "branch": "master", "commit": "fd2badc24e675f947162a16c124d395bde80dbd6" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
"nvim-lspconfig": { "branch": "master", "commit": "bb682c167a0878338b4313b55538953d1c039085" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
"nvim-tree.lua": { "branch": "master", "commit": "d41b4ca013ed89e41b9c0ecbdae5f1633e42f7fa" },
"nvim-treesitter": { "branch": "master", "commit": "4af16a10b7f1e79275f712a1c6dcf725d301a303" },
"nvim-treesitter-context": { "branch": "master", "commit": "e6cc783b74606d97ca9eff6494e3f5c2ca603a50" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" },
"nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" },
"onedark.nvim": { "branch": "master", "commit": "fae34f7c635797f4bf62fb00e7d0516efa8abe37" },
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
"quickfix-reflector.vim": { "branch": "master", "commit": "6a6a9e28e1713b9e9db99eec1e6672e5666c01b9" },
"telescope-emoji.nvim": { "branch": "master", "commit": "86248d97be84a1ce83f0541500ef9edc99ea2aa1" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" },
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
"vim-peekaboo": { "branch": "master", "commit": "cc4469c204099c73dd7534531fa8ba271f704831" },
"vim-sleuth": { "branch": "master", "commit": "cd9d382e33bb817abe7f10cdc3a606bf1d491d75" },
"vim-wakatime": { "branch": "master", "commit": "53bba6bb8342de9cbdafc82142a9b5e82008d858" }
}

View file

@ -20,7 +20,6 @@ map({ 'n', 'v' }, 'k', 'v:count == 0 ? "gk" : "k"', { expr = true, silent = true
map({ 'n', 'v' }, 'j', 'v:count == 0 ? "gj" : "j"', { expr = true, silent = true })
-- Duplicate leader feats to gradually move to
map('n', '<C-q>', function() require('utils.close_buffer').close_buffer() end)
-- Copy and paste from clipboard
map({ 'n', 'v' }, '<leader>y', '"+y')
@ -33,6 +32,12 @@ map({ 'n', 'v' }, '<leader>m', '<C-w>10>')
map({ 'n', 'v' }, '<leader>N', '<C-w>6-')
map({ 'n', 'v' }, '<leader>M', '<C-w>6+')
-- goto files
map('n', '<leader>f', 'gF')
-- Close buffers quickly
map('n', '<C-q>', ":bd<CR>", { silent = true })
-- quickfix buffer
map('n', '<M-n>', ':cn<CR>', { silent = true })
map('n', '<M-p>', ':cp<CR>', { silent = true })

View file

@ -1,12 +1,14 @@
local servers = {
clangd = {},
pyright = {},
lua_ls = require('lsp.lua_ls'),
gopls = {},
rust_analyzer = {},
bashls = {},
hls = {},
clangd = {},
eslint = {},
gopls = {},
hls = {},
jdtls = {},
kotlin_language_server = {},
lua_ls = require('lsp.lua_ls'),
pyright = {},
rust_analyzer = {},
ts_ls = {},
}

View file

@ -1,13 +1,15 @@
return {
'rcarriga/nvim-notify',
'psliwka/vim-smoothie',
'stefandtw/quickfix-reflector.vim',
'tpope/vim-fugitive',
'tpope/vim-sleuth',
'vim-scripts/iptables',
{ 'akinsho/bufferline.nvim', opts = {}, dependencies = { 'navarasu/onedark.nvim' } },
{ 'ethanholz/nvim-lastplace', opts = {} },
{ 'folke/todo-comments.nvim', opts = {} },
{ 'kylechui/nvim-surround', version = '*', event = 'VeryLazy', opts = {} },
{ 'lukas-reineke/indent-blankline.nvim', main = 'ibl', opts = {} },
{ 'norcalli/nvim-colorizer.lua', opts={ '*' }, dependencies = { 'navarasu/onedark.nvim' } },
{ 'wakatime/vim-wakatime', event = 'VeryLazy' },
-- { 'wakatime/vim-wakatime', event = 'VeryLazy' },
{ 'williamboman/mason.nvim', opts = {} },
}

View file

@ -0,0 +1,6 @@
return {
'junegunn/vim-peekaboo',
config = function ()
vim.g.peekaboo_window = 'enew'
end
}

View file

@ -4,6 +4,7 @@ return {
dependencies = {
'navarasu/onedark.nvim',
'nvim-lua/plenary.nvim',
'xiyaowong/telescope-emoji.nvim',
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
},
@ -23,7 +24,8 @@ return {
},
}
pcall(require('telescope').load_extension, 'fzf')
require('telescope').load_extension('fzf')
require('telescope').load_extension('emoji')
vim.keymap.set('n', '<leader>/', function()
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_ivy {
@ -33,9 +35,10 @@ return {
end)
vim.keymap.set('n', '<leader>?', require('telescope.builtin').live_grep)
vim.keymap.set('n', '<leader>wf', require('telescope.builtin').grep_string)
vim.keymap.set('n', '<leader>of', require('telescope.builtin').oldfiles)
vim.keymap.set('n', '<leader>af', require('telescope.builtin').git_files)
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files)
vim.keymap.set('n', '<leader>fw', require('telescope.builtin').grep_string)
vim.keymap.set('n', '<leader>.', require('telescope').extensions.emoji.emoji)
end
}

View file

@ -0,0 +1,5 @@
local M = {}
M.inspect = require('utils.inspect')
return M

View file

@ -0,0 +1,2 @@
-- https://github.com/kikito/inspect.lua
local a={Options={}}local tostring=tostring;local b=string.rep;local c=string.match;local d=string.char;local e=string.gsub;local f=string.format;local g;if rawget then g=rawget else g=function(h,i)return h[i]end end;local function j(h)return next,h,nil end;local function k(l)if c(l,'"')and not c(l,"'")then return"'"..l.."'"end;return'"'..e(l,'"','\\"')..'"'end;local m={["\a"]="\\a",["\b"]="\\b",["\f"]="\\f",["\n"]="\\n",["\r"]="\\r",["\t"]="\\t",["\v"]="\\v",["\127"]="\\127"}local n={["\127"]="\127"}for o=0,31 do local p=d(o)if not m[p]then m[p]="\\"..o;n[p]=f("\\%03d",o)end end;local function q(l)return e(e(e(l,"\\","\\\\"),"(%c)%f[0-9]",n),"%c",m)end;local r={['and']=true,['break']=true,['do']=true,['else']=true,['elseif']=true,['end']=true,['false']=true,['for']=true,['function']=true,['goto']=true,['if']=true,['in']=true,['local']=true,['nil']=true,['not']=true,['or']=true,['repeat']=true,['return']=true,['then']=true,['true']=true,['until']=true,['while']=true}local function s(l)return type(l)=="string"and not not l:match("^[_%a][_%a%d]*$")and not r[l]end;local t=math.floor;local function u(i,v)return type(i)=="number"and t(i)==i and 1<=i and i<=v end;local w={['number']=1,['boolean']=2,['string']=3,['table']=4,['function']=5,['userdata']=6,['thread']=7}local function x(y,z)local A,B=type(y),type(z)if A==B and(A=='string'or A=='number')then return y<z end;local C=w[A]or 100;local D=w[B]or 100;return C==D and A<B or C<D end;local function E(h)local F=1;while g(h,F)~=nil do F=F+1 end;F=F-1;local G,H={},0;for i in j(h)do if not u(i,F)then H=H+1;G[H]=i end end;table.sort(G,x)return G,H,F end;local function I(J,K)if type(J)=="table"then if K[J]then K[J]=K[J]+1 else K[J]=1;for i,L in j(J)do I(i,K)I(L,K)end;I(getmetatable(J),K)end end end;local function M(N,y,z)local O={}local P=#N;for o=1,P do O[o]=N[o]end;O[P+1]=y;O[P+2]=z;return O end;local function Q(R,S,N,T)if S==nil then return nil end;if T[S]then return T[S]end;local U=R(S,N)if type(U)=="table"then local V={}T[S]=V;local W;for i,L in j(U)do W=Q(R,i,M(N,i,a.KEY),T)if W~=nil then V[W]=Q(R,L,M(N,W),T)end end;local X=Q(R,getmetatable(U),M(N,a.METATABLE),T)if type(X)~='table'then X=nil end;setmetatable(V,X)U=V end;return U end;local function Y(Z,l)Z.n=Z.n+1;Z[Z.n]=l end;local _={}local a0={__index=_}local function a1(a2)Y(a2.buf,a2.newline..b(a2.indent,a2.level))end;function _:getId(L)local a3=self.ids[L]local a4=self.ids;if not a3 then local a5=type(L)a3=(a4[a5]or 0)+1;a4[L],a4[a5]=a3,a3 end;return tostring(a3)end;function _:putValue(L)local Z=self.buf;local a5=type(L)if a5=='string'then Y(Z,k(q(L)))elseif a5=='number'or a5=='boolean'or a5=='nil'or a5=='cdata'or a5=='ctype'then Y(Z,tostring(L))elseif a5=='table'and not self.ids[L]then local h=L;if h==a.KEY or h==a.METATABLE then Y(Z,tostring(h))elseif self.level>=self.depth then Y(Z,'{...}')else if self.cycles[h]>1 then Y(Z,f('<%d>',self:getId(h)))end;local G,H,F=E(h)Y(Z,'{')self.level=self.level+1;for o=1,F+H do if o>1 then Y(Z,',')end;if o<=F then Y(Z,' ')self:putValue(h[o])else local i=G[o-F]a1(self)if s(i)then Y(Z,i)else Y(Z,"[")self:putValue(i)Y(Z,"]")end;Y(Z,' = ')self:putValue(h[i])end end;local X=getmetatable(h)if type(X)=='table'then if F+H>0 then Y(Z,',')end;a1(self)Y(Z,'<metatable> = ')self:putValue(X)end;self.level=self.level-1;if H>0 or type(X)=='table'then a1(self)elseif F>0 then Y(Z,' ')end;Y(Z,'}')end else Y(Z,f('<%s %d>',a5,self:getId(L)))end end;function a.inspect(a6,a7)a7=a7 or{}local a8=a7.depth or math.huge;local a9=a7.newline or'\n'local aa=a7.indent or' 'local R=a7.process;if R then a6=Q(R,a6,{},{})end;local K={}I(a6,K)local a2=setmetatable({buf={n=0},ids={},cycles=K,depth=a8,level=0,newline=a9,indent=aa},a0)a2:putValue(a6)return table.concat(a2.buf)end;setmetatable(a,{__call=function(ab,a6,a7)return a.inspect(a6,a7)end})return a