Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • iliya.saroukha/nvim
1 result
Show changes
Commits on Source (18)
vim.cmd [[autocmd! ColorScheme * highlight NormalFloat bg=#1f1d2e guibg=#1f1d2e]]
vim.cmd [[autocmd! ColorScheme * highlight FloatBorder guifg=#ea9a97]]
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]
-- [[ Highlight on yank ]]
......
......@@ -31,12 +31,11 @@ vim.keymap.set("n", "<leader>f", vim.lsp.buf.format)
vim.keymap.set("n", "<leader>x", "<cmd>!chmod u+x %<CR>", { silent = true })
vim.keymap.set("n", "<leader>ng", ":lua require('neogen').generate()<CR>")
vim.keymap.set("n", "<leader>t", "<cmd>TroubleToggle<CR>")
vim.keymap.set("n", "<leader>mp", "<cmd>MarkdownPreviewToggle<CR>")
-- vim.keymap.set("n", "<leader>mp", "<cmd>MarkdownPreviewToggle<CR>")
vim.keymap.set("n", "<leader><leader>", function()
vim.cmd("so")
vim.keymap.set("n", "<leader>s", function()
vim.cmd("so")
end)
-- Diagnostic keymaps
......@@ -51,16 +50,15 @@ vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
-- LazyGit
vim.keymap.set("n", "<leader>lg", "<cmd>LazyGit<CR>")
-- Telescope
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
vim.keymap.set('n', '<leader>/', function()
-- You can pass additional configuration to telescope to change theme, layout, etc.
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
winblend = 10,
previewer = false,
})
-- You can pass additional configuration to telescope to change theme, layout, etc.
require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
winblend = 10,
previewer = false,
})
end, { desc = '[/] Fuzzily search in current buffer' })
vim.keymap.set('n', '<C-p>', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
......@@ -69,4 +67,7 @@ vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
-- vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' })
-- Peek
vim.keymap.set("n", "<leader>mp", "<cmd>PeekOpen<CR>")
return {
"MagicDuck/grug-far.nvim",
opts = { headerMaxWidth = 80 },
cmd = "GrugFar",
keys = {
{
"<leader>sr",
function()
local grug = require("grug-far")
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")
grug.grug_far({
transient = true,
prefills = {
filesFilter = ext and ext ~= "" and "*." .. ext or nil,
},
})
end,
mode = { "n", "v" },
desc = "Search and Replace",
},
},
}
......@@ -6,7 +6,7 @@ return {
require('lualine').setup({
options = {
--- @usage 'rose-pine' | 'rose-pine-alt'
theme = 'rose-pine'
theme = 'rose-pine-alt'
}
})
end
......
return {
'MeanderingProgrammer/markdown.nvim',
main = "render-markdown",
opts = {},
name = 'render-markdown', -- Only needed if you have another plugin named markdown.nvim
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
}
return {
"danymat/neogen",
config = true,
-- Uncomment next line if you want to follow only stable versions
-- version = "*"
}
......@@ -18,12 +18,12 @@ return { -- Autocompletion
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
{
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
},
},
'saadparwaiz1/cmp_luasnip',
......
......@@ -60,6 +60,12 @@ return { -- LSP Configuration & Plugins
-- NOTE: Remember that Lua is a real programming language, and as such it is possible
-- to define small helper and utility functions so you don't have to repeat yourself.
--
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end
-- In this case, we create a function that lets us more easily define mappings specific
-- for LSP related items. It sets the mode, buffer and description for us each time.
local map = function(keys, func, desc)
......@@ -161,10 +167,11 @@ return { -- LSP Configuration & Plugins
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
clangd = {},
gopls = {},
pylsp = {},
rust_analyzer = {},
marksman = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
......@@ -202,6 +209,13 @@ return { -- LSP Configuration & Plugins
-- for you, so that they are available from within Neovim.
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {
'clangd',
'gopls',
'lua_ls',
'marksman',
'pylsp',
'rust-analyzer',
'zls',
'stylua', -- Used to format Lua code
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
......
return {
'nvim-treesitter/nvim-treesitter-context'
}
return {
-- Highlight, edit, and navigate code
return { -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
},
build = ':TSUpdate',
opts = {
ensure_installed = { "rust", "c", "lua", "vim", "vimdoc", "query" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
enable = true,
-- 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).
-- 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
additional_vim_regex_highlighting = false,
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
-- If you are experiencing weird indenting issues, add the language to
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
additional_vim_regex_highlighting = { 'ruby' },
},
}
indent = { enable = true, disable = { 'ruby' } },
},
config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup(opts)
-- There are additional nvim-treesitter modules that you can use to interact
-- with nvim-treesitter. You should go explore a few and see what interests you:
--
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
end,
}
return {
"toppair/peek.nvim",
event = { "VeryLazy" },
build = "deno task --quiet build:fast",
config = function()
-- default config:
require('peek').setup({
auto_load = true, -- whether to automatically load preview when
-- entering another markdown buffer
close_on_bdelete = true, -- close preview window on buffer delete
syntax = true, -- enable syntax highlighting, affects performance
theme = 'dark', -- 'dark' or 'light'
update_on_change = true,
app = 'browser', -- 'webview', 'browser', string or a table of strings
-- explained below
filetype = { 'markdown' }, -- list of filetypes to recognize as markdown
-- relevant if update_on_change is true
throttle_at = 200000, -- start throttling when file exceeds this
-- amount of bytes in size
throttle_time = 'auto', -- minimum amount of time in milliseconds
-- that has to pass before starting new render
})
vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
end,
}
-- plugins/quarto.lua
return {
{
"quarto-dev/quarto-nvim",
dependencies = {
"jmbuhr/otter.nvim",
"nvim-treesitter/nvim-treesitter",
},
},
}
......@@ -5,8 +5,8 @@ return {
priority = 1000,
config = function()
require('rose-pine').setup({
variant = "moon", -- auto, main, moon, or dawn
dark_variant = "main", -- main, moon, or dawn
variant = "auto", -- auto, main, moon, or dawn
dark_variant = "moon", -- main, moon, or dawn
dim_inactive_windows = false,
extend_background_behind_borders = false,
......@@ -55,6 +55,16 @@ return {
-- VertSplit = { fg = "muted", bg = "muted" },
Normal = { bg = 'none' },
NormalFloat = { bg = 'none' },
FloatBorder = {
bg = 'none',
fg = 'iris'
},
TelescopeBorder = {
fg = 'iris'
},
Visual = { reverse = true },
ColorColumn = { bg = 'rose' },
-- Blend colours against the "base" background
......@@ -64,7 +74,7 @@ return {
-- By default each group adds to the existing config.
-- If you only want to set what is written in this config exactly,
-- you can set the inherit option:
IncSearch = { bg = 'pine', inherit = false },
IncSearch = { reverse = true, inherit = false },
},
before_highlight = function(group, highlight, palette)
......
return {
-- Fuzzy Finder (files, lsp, etc)
'nvim-telescope/telescope.nvim',
branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim',
-- Fuzzy Finder Algorithm which requires local dependencies to be built.
-- Only load if `make` is available. Make sure you have the system
-- requirements installed.
{
'nvim-telescope/telescope-fzf-native.nvim',
-- NOTE: If you are having trouble with this installation,
-- refer to the README for telescope-fzf-native for more instructions.
build = 'make',
cond = function()
return vim.fn.executable 'make' == 1
end,
},
},
return { -- Fuzzy Finder (files, lsp, etc)
'nvim-telescope/telescope.nvim',
event = 'VimEnter',
branch = '0.1.x',
dependencies = {
'nvim-lua/plenary.nvim',
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
'nvim-telescope/telescope-fzf-native.nvim',
-- `build` is used to run some command when the plugin is installed/updated.
-- This is only run then, not every time Neovim starts up.
build = 'make',
-- `cond` is a condition used to determine whether this plugin should be
-- installed and loaded.
cond = function()
return vim.fn.executable 'make' == 1
end,
},
-- Useful for getting pretty icons, but requires a Nerd Font.
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
}
}