Compare commits
10 Commits
ea9f53e245
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a109dc1f55 | ||
|
|
6c236d0d82 | ||
|
|
c236b872e3 | ||
|
|
280b3410ad | ||
|
|
31ba892afa | ||
|
|
421467a8bd | ||
|
|
3c64f0e4b1 | ||
|
|
c31f64b2cd | ||
|
|
e6716db162 | ||
|
|
c97782eab3 |
3
.clang-format
Normal file
3
.clang-format
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
IndentWidth: 4
|
||||||
|
TabWidth: 4
|
||||||
|
PointerAlignment: Left
|
||||||
@@ -4,7 +4,7 @@ vim.opt.number = true
|
|||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
vim.opt.hlsearch = false
|
vim.opt.hlsearch = false
|
||||||
vim.opt.incsearch = true
|
vim.opt.incsearch = true
|
||||||
vim.opt.colorcolumn = "80"
|
vim.opt.colorcolumn = "80,120"
|
||||||
|
|
||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 4
|
||||||
vim.opt.softtabstop = 4
|
vim.opt.softtabstop = 4
|
||||||
@@ -14,6 +14,18 @@ vim.opt.expandtab = true
|
|||||||
vim.opt.smartindent = true
|
vim.opt.smartindent = true
|
||||||
vim.opt.scrolloff = 8
|
vim.opt.scrolloff = 8
|
||||||
|
|
||||||
|
-- :map [[ ?{<CR>w99[{
|
||||||
|
-- :map ][ /}<CR>b99]}
|
||||||
|
-- :map ]] j0[[%/{<CR>
|
||||||
|
-- :map [] k$][%?}<CR>
|
||||||
|
-- rewrite in lua
|
||||||
|
-- vim.keymap.set({ "n" }, "[[", function() vim.cmd("normal ?{\<CR>w99[{") end, { silent = true })
|
||||||
|
-- vim.keymap.set({ "n" }, "][", function() vim.cmd("normal /}\<CR>b99]}") end, { silent = true })
|
||||||
|
-- vim.keymap.set({ "n" }, "]]", function() vim.cmd("normal j0[[%/{\<CR>") end, { silent = true })
|
||||||
|
-- vim.keymap.set({ "n" }, "[]", function() vim.cmd("normal k$][%?}\<CR>") end, { silent = true })
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
@@ -28,22 +40,47 @@ end
|
|||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
{ "ellisonleao/gruvbox.nvim", priority = 1000 , config = true, opts = ...},
|
{
|
||||||
{'mg979/vim-visual-multi'},
|
"ellisonleao/gruvbox.nvim",
|
||||||
{'williamboman/mason.nvim'},
|
priority = 1000,
|
||||||
{'williamboman/mason-lspconfig.nvim'},
|
config = true,
|
||||||
{'VonHeikemen/lsp-zero.nvim', branch = 'v3.x'},
|
opts = ...
|
||||||
{'neovim/nvim-lspconfig'},
|
},
|
||||||
{'hrsh7th/cmp-nvim-lsp'},
|
{ 'mg979/vim-visual-multi' },
|
||||||
{'hrsh7th/nvim-cmp'},
|
{ 'tpope/vim-fugitive' },
|
||||||
{'L3MON4D3/LuaSnip'},
|
{ 'williamboman/mason.nvim' },
|
||||||
{'nvim-treesitter/nvim-treesitter'},
|
{ 'williamboman/mason-lspconfig.nvim' },
|
||||||
{'mbbill/undotree'},
|
{
|
||||||
{'nvim-telescope/telescope.nvim', branch = '0.1.x',
|
'VonHeikemen/lsp-zero.nvim',
|
||||||
dependencies = { 'nvim-lua/plenary.nvim' }},
|
branch = 'v3.x'
|
||||||
|
},
|
||||||
|
{ 'neovim/nvim-lspconfig' },
|
||||||
|
{ 'github/copilot.vim' },
|
||||||
|
{ 'hrsh7th/cmp-nvim-lsp' },
|
||||||
|
{ 'hrsh7th/cmp-buffer' },
|
||||||
|
{ 'hrsh7th/cmp-path' },
|
||||||
|
{ 'hrsh7th/cmp-cmdline' },
|
||||||
|
{ 'hrsh7th/nvim-cmp' },
|
||||||
|
{ 'saadparwaiz1/cmp_luasnip' },
|
||||||
|
{
|
||||||
|
'L3MON4D3/LuaSnip',
|
||||||
|
version = "v2.*",
|
||||||
|
dependencies = { "rafamadriz/friendly-snippets" },
|
||||||
|
},
|
||||||
|
{ 'nvim-treesitter/nvim-treesitter' },
|
||||||
|
{ 'mbbill/undotree' },
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
branch = '0.1.x',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
cmd = {
|
||||||
|
"MarkdownPreviewToggle",
|
||||||
|
"MarkdownPreview",
|
||||||
|
"MarkdownPreviewStop"
|
||||||
|
},
|
||||||
ft = { "markdown" },
|
ft = { "markdown" },
|
||||||
build = function() vim.fn["mkdp#util#install"]() end,
|
build = function() vim.fn["mkdp#util#install"]() end,
|
||||||
},
|
},
|
||||||
@@ -55,42 +92,59 @@ vim.cmd([[colorscheme gruvbox]])
|
|||||||
local lsp_zero = require('lsp-zero')
|
local lsp_zero = require('lsp-zero')
|
||||||
lsp_zero.preset('recommended')
|
lsp_zero.preset('recommended')
|
||||||
lsp_zero.on_attach(function(client, bufnr)
|
lsp_zero.on_attach(function(client, bufnr)
|
||||||
lsp_zero.default_keymaps({buffer = bufnr})
|
lsp_zero.default_keymaps({ buffer = bufnr })
|
||||||
end)
|
end)
|
||||||
lsp_zero.setup()
|
lsp_zero.setup()
|
||||||
|
|
||||||
require('mason').setup({})
|
require('mason').setup({})
|
||||||
|
|
||||||
require('mason-lspconfig').setup({
|
require('mason-lspconfig').setup({
|
||||||
ensure_installed = {},
|
ensure_installed = { 'lua_ls', 'rust_analyzer', 'clangd', 'biome', 'cmake',
|
||||||
handlers = {
|
'dockerls', 'html', 'grammarly', 'zls' },
|
||||||
lsp_zero.default_setup,
|
handlers = {
|
||||||
},
|
lsp_zero.default_setup,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
require'nvim-treesitter.configs'.setup {
|
require 'nvim-treesitter.configs'.setup {
|
||||||
-- A list of parser names, or "all"
|
-- A list of parser names, or "all"
|
||||||
ensure_installed = { "javascript", "typescript", "c", "lua", "rust", "python",
|
ensure_installed = { "javascript", "typescript", "c", "lua", "rust",
|
||||||
"gdscript", "html", "css", "sql", "markdown" },
|
"python", "gdscript", "html", "css", "sql", "markdown", "org" },
|
||||||
|
|
||||||
-- Install parsers synchronously (only applied to `ensure_installed`)
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
|
|
||||||
-- Automatically install missing parsers when entering buffer
|
-- Automatically install missing parsers when entering buffer
|
||||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
-- `false` will disable the whole extension
|
-- `false` will disable the whole extension
|
||||||
enable = true,
|
enable = true,
|
||||||
|
|
||||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||||
-- Instead of true it can also be a list of languages
|
-- Instead of true it can also be a list of languages
|
||||||
additional_vim_regex_highlighting = false,
|
additional_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
|
|
||||||
|
--- TODO: What is expand?
|
||||||
|
vim.keymap.set({ "i" }, "<C-s>e", function() ls.expand() end, { silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set({ "i", "s" }, "<C-s>;", function() ls.jump(1) end, { silent = true })
|
||||||
|
vim.keymap.set({ "i", "s" }, "<C-s>,", function() ls.jump(-1) end, { silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set({ "i", "s" }, "<C-E>", function()
|
||||||
|
if ls.choice_active() then
|
||||||
|
ls.change_choice(1)
|
||||||
|
end
|
||||||
|
end, { silent = true })
|
||||||
|
|
||||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
|
||||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
|
||||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
|
||||||
@@ -99,5 +153,40 @@ vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
|
|||||||
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
|
||||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||||
|
|
||||||
|
local ls = require("luasnip")
|
||||||
|
ls.filetype_extend("javascript", { "jsdoc" })
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local cmp_format = lsp_zero.cmp_format({ details = true })
|
||||||
|
cmp.setup({
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
{ name = 'luasnip' },
|
||||||
|
{ name = 'buffer' },
|
||||||
|
{ name = 'path' },
|
||||||
|
},
|
||||||
|
--- (Optional) Show source name in completion menu
|
||||||
|
formatting = cmp_format,
|
||||||
|
})
|
||||||
|
cmp.setup.cmdline('/', {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = {
|
||||||
|
{ name = 'buffer' }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
cmp.setup.cmdline(':', {
|
||||||
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'path' }
|
||||||
|
}, {
|
||||||
|
{
|
||||||
|
name = 'cmdline',
|
||||||
|
option = {
|
||||||
|
ignore_cmds = { 'Man', '!' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
|
||||||
-- markdown
|
-- markdown
|
||||||
vim.g.mkdp_auto_start = 1
|
vim.g.mkdp_auto_start = 1
|
||||||
|
|||||||
17
.config/tmux/tmux.conf
Normal file
17
.config/tmux/tmux.conf
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
set -ga terminal-overrides ",screen-256color*:Tc"
|
||||||
|
set-option -g default-terminal "screen-256color"
|
||||||
|
set -s escape-time 0
|
||||||
|
|
||||||
|
set -g status-style 'bg=#98971a fg=#1d2021'
|
||||||
|
|
||||||
|
set -g mouse on
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
bind -T copy-mode-vi v send-keys -X begin-selection
|
||||||
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
||||||
|
|
||||||
|
# vim-like pane switching
|
||||||
|
bind -r ^ last-window
|
||||||
|
bind -r k select-pane -U
|
||||||
|
bind -r j select-pane -D
|
||||||
|
bind -r h select-pane -L
|
||||||
|
bind -r l select-pane -R
|
||||||
16
ubuntu.sh
Normal file
16
ubuntu.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
sudo apt update
|
||||||
|
sudo add-apt-repository ppa:neovim-ppa/unstable
|
||||||
|
sudo apt install build-essential btop fish neovim tmux curl git nodejs npm ripgrep
|
||||||
|
|
||||||
|
curl -fsSL https://bun.sh/install | bash
|
||||||
|
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
|
||||||
|
curl -L https://foundry.paradigm.xyz | bash
|
||||||
|
source /home/patryk/.bashrc
|
||||||
|
foundryup
|
||||||
|
|
||||||
|
sudo apt install chromium alacritty vlc krita inkscape blender
|
||||||
|
|
||||||
|
which fish
|
||||||
|
chsh patryk
|
||||||
Reference in New Issue
Block a user