mirror of
https://github.com/szymon-jozef/superior_dotfiles.git
synced 2026-09-07 12:10:38 +02:00
Add .config/nvim/init.lua
Add .config/nvim/lazy-lock.json Add .config/nvim/lua/nvim_is_strange/lazy.lua Add .config/nvim/lua/nvim_is_strange/plugins/colorscheme.lua Add .config/nvim/lua/nvim_is_strange/plugins/git.lua Add .config/nvim/lua/nvim_is_strange/plugins/harpoon.lua Add .config/nvim/lua/nvim_is_strange/plugins/lsp.lua Add .config/nvim/lua/nvim_is_strange/plugins/statusline.lua Add .config/nvim/lua/nvim_is_strange/plugins/telescope.lua Add .config/nvim/lua/nvim_is_strange/plugins/treesitter.lua Add .config/nvim/lua/nvim_is_strange/plugins/undotree.lua Add .config/nvim/lua/nvim_is_strange/plugins/whichkey.lua Add .config/nvim/lua/nvim_is_strange/remaps.lua Add .config/nvim/lua/nvim_is_strange/set.lua Add .config/nvim/spell/pl.cp1250.spl Add .config/nvim/spell/pl.iso-8859-2.spl Add .config/nvim/spell/pl.utf-8.spl
This commit is contained in:
5
private_dot_config/nvim/init.lua
Normal file
5
private_dot_config/nvim/init.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
require("nvim_is_strange.lazy")
|
||||||
|
require("nvim_is_strange.set")
|
||||||
|
require("nvim_is_strange.remaps")
|
||||||
|
|
||||||
|
|
||||||
30
private_dot_config/nvim/lazy-lock.json
Normal file
30
private_dot_config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" },
|
||||||
|
"autoclose.nvim": { "branch": "main", "commit": "b2077aa2c83df7ebc19b2a20a3a0654b24ae9c8f" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
|
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||||
|
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
|
||||||
|
"galaxyline.nvim": { "branch": "main", "commit": "4d4f5fc8e20a10824117e5beea7ec6e445466a8f" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "d600d3922c1d001422689319a8f915136bb64e1e" },
|
||||||
|
"harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
|
||||||
|
"minimal.nvim": { "branch": "main", "commit": "22d837b814d3bd22625640ef63cc73b8507f291d" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "a56f4b9dde5daf3d4c7bb50cf78ab609537f2259" },
|
||||||
|
"nvim-surround": { "branch": "main", "commit": "caf6f633d4d77a29b6e265b560c5a035d171a913" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "684eeac91ed8e297685a97ef70031d19ac1de25a" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "c90dee4e930ab9f49fa6d77f289bff335b49e972" },
|
||||||
|
"phpactor.nvim": { "branch": "main", "commit": "f4aba0b309f74b015f4a19a07e2befd6f1a0e6ca" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
|
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
|
||||||
|
"vim-illuminate": { "branch": "master", "commit": "1fa4b23409e22a03823648e344c77f260e2572cb" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||||
|
}
|
||||||
32
private_dot_config/nvim/lua/nvim_is_strange/lazy.lua
Normal file
32
private_dot_config/nvim/lua/nvim_is_strange/lazy.lua
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
|
-- Bootstrap lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
vim.opt.rtp:prepend(vim.fn.stdpath("data") .. "/lazy/")
|
||||||
|
|
||||||
|
-- Setup lazy.nvim
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- import your plugins
|
||||||
|
{ import = "nvim_is_strange.plugins" },
|
||||||
|
},
|
||||||
|
install = { colorscheme = { "minimal" } },
|
||||||
|
checker = { enabled = true },
|
||||||
|
ui = {
|
||||||
|
border = "rounded"
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
"Yazeed1s/minimal.nvim"
|
||||||
|
}
|
||||||
56
private_dot_config/nvim/lua/nvim_is_strange/plugins/git.lua
Normal file
56
private_dot_config/nvim/lua/nvim_is_strange/plugins/git.lua
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
return {
|
||||||
|
"lewis6991/gitsigns.nvim",
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
require('gitsigns').setup {
|
||||||
|
signs = {
|
||||||
|
add = { text = '┃' },
|
||||||
|
change = { text = '┃' },
|
||||||
|
delete = { text = '_' },
|
||||||
|
topdelete = { text = '‾' },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
untracked = { text = '┆' },
|
||||||
|
},
|
||||||
|
signs_staged = {
|
||||||
|
add = { text = '┃' },
|
||||||
|
change = { text = '┃' },
|
||||||
|
delete = { text = '_' },
|
||||||
|
topdelete = { text = '‾' },
|
||||||
|
changedelete = { text = '~' },
|
||||||
|
untracked = { text = '┆' },
|
||||||
|
},
|
||||||
|
signs_staged_enable = true,
|
||||||
|
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||||
|
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||||
|
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||||
|
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||||
|
watch_gitdir = {
|
||||||
|
follow_files = true
|
||||||
|
},
|
||||||
|
auto_attach = true,
|
||||||
|
attach_to_untracked = false,
|
||||||
|
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||||
|
current_line_blame_opts = {
|
||||||
|
virt_text = true,
|
||||||
|
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||||
|
delay = 1000,
|
||||||
|
ignore_whitespace = false,
|
||||||
|
virt_text_priority = 100,
|
||||||
|
use_focus = true,
|
||||||
|
},
|
||||||
|
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
|
||||||
|
sign_priority = 6,
|
||||||
|
update_debounce = 100,
|
||||||
|
status_formatter = nil, -- Use default
|
||||||
|
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||||
|
preview_config = {
|
||||||
|
-- Options passed to nvim_open_win
|
||||||
|
border = 'single',
|
||||||
|
style = 'minimal',
|
||||||
|
relative = 'cursor',
|
||||||
|
row = 0,
|
||||||
|
col = 1
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
return {
|
||||||
|
"ThePrimeagen/harpoon",
|
||||||
|
|
||||||
|
branch = "harpoon2",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
|
||||||
|
-- REQUIRED
|
||||||
|
harpoon:setup()
|
||||||
|
-- REQUIRED
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end, { desc = "Add file to harpoon" })
|
||||||
|
vim.keymap.set("n", "<leader>r", function() harpoon:list():remove() end, { desc = "Remove file from harpoon" })
|
||||||
|
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
||||||
|
vim.keymap.set("n", "<C-j>", function() harpoon:list():select(2) end)
|
||||||
|
vim.keymap.set("n", "<C-k>", function() harpoon:list():select(3) end)
|
||||||
|
vim.keymap.set("n", "<C-l>", function() harpoon:list():select(4) end)
|
||||||
|
|
||||||
|
-- Toggle previous & next buffers stored within Harpoon list
|
||||||
|
vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end)
|
||||||
|
vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end)
|
||||||
|
|
||||||
|
-- basic telescope configuration
|
||||||
|
local conf = require("telescope.config").values
|
||||||
|
local function toggle_telescope(harpoon_files)
|
||||||
|
local file_paths = {}
|
||||||
|
for _, item in ipairs(harpoon_files.items) do
|
||||||
|
table.insert(file_paths, item.value)
|
||||||
|
end
|
||||||
|
|
||||||
|
require("telescope.pickers").new({}, {
|
||||||
|
prompt_title = "Harpoon",
|
||||||
|
finder = require("telescope.finders").new_table({
|
||||||
|
results = file_paths,
|
||||||
|
}),
|
||||||
|
previewer = conf.file_previewer({}),
|
||||||
|
sorter = conf.generic_sorter({}),
|
||||||
|
}):find()
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-e>", function() toggle_telescope(harpoon:list()) end,
|
||||||
|
{ desc = "Open harpoon window" })
|
||||||
|
end
|
||||||
|
}
|
||||||
182
private_dot_config/nvim/lua/nvim_is_strange/plugins/lsp.lua
Normal file
182
private_dot_config/nvim/lua/nvim_is_strange/plugins/lsp.lua
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
return {
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
dependencies = {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/cmp-buffer",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"hrsh7th/cmp-cmdline",
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
"L3MON4D3/LuaSnip",
|
||||||
|
"saadparwaiz1/cmp_luasnip",
|
||||||
|
"j-hui/fidget.nvim",
|
||||||
|
"numToStr/Comment.nvim",
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
"kylechui/nvim-surround",
|
||||||
|
'm4xshen/autoclose.nvim',
|
||||||
|
"gbprod/phpactor.nvim",
|
||||||
|
"RRethy/vim-illuminate",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local cmp_lsp = require("cmp_nvim_lsp")
|
||||||
|
local capabilities = vim.tbl_deep_extend(
|
||||||
|
"force",
|
||||||
|
{},
|
||||||
|
vim.lsp.protocol.make_client_capabilities(),
|
||||||
|
cmp_lsp.default_capabilities()
|
||||||
|
)
|
||||||
|
|
||||||
|
require("fidget").setup({})
|
||||||
|
require("mason").setup()
|
||||||
|
|
||||||
|
require('mason-lspconfig').setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"lua_ls",
|
||||||
|
"intelephense",
|
||||||
|
"ts_ls",
|
||||||
|
"emmet_language_server",
|
||||||
|
"marksman",
|
||||||
|
"arduino_language_server",
|
||||||
|
},
|
||||||
|
handlers = { -- config lsp
|
||||||
|
function(server_name)
|
||||||
|
require("lspconfig")[server_name].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
lua_ls = function()
|
||||||
|
require('lspconfig').lua_ls.setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = {
|
||||||
|
version = 'LuaJIT'
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
globals = { 'vim', 'love' },
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
library = {
|
||||||
|
vim.env.VIMRUNTIME,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
|
emmet_language_server = function()
|
||||||
|
require("lspconfig").emmet_language_server.setup({
|
||||||
|
filetypes = {
|
||||||
|
"html",
|
||||||
|
"css",
|
||||||
|
"js",
|
||||||
|
"php",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
|
||||||
|
marksman = function()
|
||||||
|
require("lspconfig").marksman.setup({
|
||||||
|
filetypes = {
|
||||||
|
"markdown",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
local cmp = require("cmp")
|
||||||
|
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
||||||
|
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
sources = {
|
||||||
|
{ name = 'path' },
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "luasnip", keyword_lenght = 2 },
|
||||||
|
{ name = "buffer", keyword_lenght = 3 },
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||||
|
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||||
|
['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
}),
|
||||||
|
snippets = {
|
||||||
|
expand = function(args)
|
||||||
|
require('luasnip').lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
completion = cmp.config.window.bordered(),
|
||||||
|
documentation = cmp.config.window.bordered(),
|
||||||
|
},
|
||||||
|
formatting = {
|
||||||
|
fields = { 'menu', 'abbr', 'kind' },
|
||||||
|
|
||||||
|
format = function(entry, item)
|
||||||
|
local menu_icon = {
|
||||||
|
nvim_lsp = 'λ',
|
||||||
|
luasnip = '⋗',
|
||||||
|
buffer = 'Ω',
|
||||||
|
path = '🖫',
|
||||||
|
nvim_lua = 'Π',
|
||||||
|
}
|
||||||
|
|
||||||
|
item.menu = menu_icon[entry.source.name]
|
||||||
|
return item
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- autoformat --
|
||||||
|
local buffer_autoformat = function(bufnr)
|
||||||
|
local group = 'lsp_autoformat'
|
||||||
|
vim.api.nvim_create_augroup(group, { clear = false })
|
||||||
|
vim.api.nvim_clear_autocmds({ group = group, buffer = bufnr })
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||||
|
buffer = bufnr,
|
||||||
|
group = group,
|
||||||
|
desc = "LSP format on save",
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format({ async = false, timeout_ms = 10000 })
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
callback = function(event)
|
||||||
|
local id = vim.tbl_get(event, 'data', 'client_id')
|
||||||
|
local client = id and vim.lsp.get_client_by_id(id)
|
||||||
|
|
||||||
|
if client == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if client.supports_method('textDocument/formatting') then
|
||||||
|
buffer_autoformat(event.buf)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
require("Comment").setup({
|
||||||
|
mappings = {
|
||||||
|
basic = true
|
||||||
|
},
|
||||||
|
opleader = {
|
||||||
|
line = '<leader>cl',
|
||||||
|
block = '<leader>cb',
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
require("ibl").setup()
|
||||||
|
|
||||||
|
require("nvim-surround").setup()
|
||||||
|
require("autoclose").setup()
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
return {
|
||||||
|
"NTBBloodbath/galaxyline.nvim",
|
||||||
|
|
||||||
|
dependencies = {
|
||||||
|
"kyazdani42/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
require("galaxyline.themes.eviline")
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
return {
|
||||||
|
'nvim-telescope/telescope.nvim', tag = '0.1.8',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' }
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
return {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
return {
|
||||||
|
"jiaoshijie/undotree",
|
||||||
|
dependencies = "nvim-lua/plenary.nvim",
|
||||||
|
keys = { -- load the plugin only when using it's keybinding:
|
||||||
|
{ "<leader>u", "<cmd>lua require('undotree').toggle()<cr>", desc = "Show undotree" },
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require('undotree').setup({
|
||||||
|
float_diff = true, -- using float window previews diff, set this `true` will disable layout option
|
||||||
|
layout = "left_bottom", -- "left_bottom", "left_left_bottom"
|
||||||
|
position = "left", -- "right", "bottom"
|
||||||
|
ignore_filetype = { 'undotree', 'undotreeDiff', 'qf', 'TelescopePrompt', 'spectre_panel', 'tsplayground' },
|
||||||
|
window = {
|
||||||
|
winblend = 30,
|
||||||
|
},
|
||||||
|
keymaps = {
|
||||||
|
['j'] = "move_next",
|
||||||
|
['k'] = "move_prev",
|
||||||
|
['gj'] = "move2parent",
|
||||||
|
['J'] = "move_change_next",
|
||||||
|
['K'] = "move_change_prev",
|
||||||
|
['<cr>'] = "action_enter",
|
||||||
|
['p'] = "enter_diffbuf",
|
||||||
|
['q'] = "quit",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
)
|
||||||
|
end
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
return {
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
-- your configuration comes here
|
||||||
|
-- or leave it empty to use the default settings
|
||||||
|
-- refer to the configuration section below
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>?",
|
||||||
|
function()
|
||||||
|
require("which-key").show({ global = false })
|
||||||
|
end,
|
||||||
|
desc = "Buffer Local Keymaps (which-key)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
30
private_dot_config/nvim/lua/nvim_is_strange/remaps.lua
Normal file
30
private_dot_config/nvim/lua/nvim_is_strange/remaps.lua
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
-- telescope --
|
||||||
|
|
||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||||
|
vim.keymap.set('n', '<leader>fg', builtin.git_files, { desc = 'Telescope find git' })
|
||||||
|
|
||||||
|
-- lsp --
|
||||||
|
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, { noremap = true, silent = true, desc = "Code action" })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>cf', vim.lsp.buf.format, { desc = "Code format" })
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { desc = "Go to definition" })
|
||||||
|
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, { desc = "Go to implementation" })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>r', vim.lsp.buf.rename, { desc = "Rename symbol" })
|
||||||
|
|
||||||
|
-- move shit --
|
||||||
|
vim.keymap.set('x', '>', ">gv", { desc = "Move code right" })
|
||||||
|
vim.keymap.set('x', '<', "<gv", { desc = "Move code left" })
|
||||||
|
|
||||||
|
-- autosave in markdown--
|
||||||
|
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||||
|
callback = function()
|
||||||
|
if vim.bo.modified and vim.bo.ft == "markdown" then
|
||||||
|
vim.cmd("w");
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
-- other --
|
||||||
|
vim.keymap.set('n', '<space>', '<Nop>')
|
||||||
45
private_dot_config/nvim/lua/nvim_is_strange/set.lua
Normal file
45
private_dot_config/nvim/lua/nvim_is_strange/set.lua
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
-- Kolorystyka
|
||||||
|
vim.cmd.colorscheme("minimal")
|
||||||
|
|
||||||
|
-- Wygląd
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.signcolumn = 'yes'
|
||||||
|
vim.opt.cursorline = false
|
||||||
|
|
||||||
|
-- Automatyczne podświetlanie skopiowanej linii po użyciu 'yy'
|
||||||
|
vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
|
group = "YankHighlight",
|
||||||
|
callback = function()
|
||||||
|
vim.highlight.on_yank({ higroup = "IncSearch", timeout = 200 })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Włącz widoczność whitespaces
|
||||||
|
vim.opt.list = true
|
||||||
|
|
||||||
|
-- Tabulatory i wcięcia
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
|
||||||
|
-- Przewijanie i kursor
|
||||||
|
vim.opt.scrolloff = 8
|
||||||
|
vim.o.sidescrolloff = 8
|
||||||
|
vim.opt.cursorline = true
|
||||||
|
|
||||||
|
-- Wyszukiwanie
|
||||||
|
vim.opt.incsearch = true
|
||||||
|
vim.opt.hlsearch = false
|
||||||
|
|
||||||
|
-- Ogólne ustawienia
|
||||||
|
vim.opt.clipboard = "unnamedplus"
|
||||||
|
vim.opt.wrap = false
|
||||||
|
vim.opt.updatetime = 50
|
||||||
|
|
||||||
|
-- Język --
|
||||||
|
vim.opt.spell = true
|
||||||
|
vim.opt.spelllang = { 'pl', 'en' }
|
||||||
BIN
private_dot_config/nvim/spell/executable_pl.cp1250.spl
Normal file
BIN
private_dot_config/nvim/spell/executable_pl.cp1250.spl
Normal file
Binary file not shown.
BIN
private_dot_config/nvim/spell/executable_pl.iso-8859-2.spl
Normal file
BIN
private_dot_config/nvim/spell/executable_pl.iso-8859-2.spl
Normal file
Binary file not shown.
BIN
private_dot_config/nvim/spell/executable_pl.utf-8.spl
Normal file
BIN
private_dot_config/nvim/spell/executable_pl.utf-8.spl
Normal file
Binary file not shown.
Reference in New Issue
Block a user