Compare commits

..

8 Commits

Author SHA1 Message Date
5ad7502e88 surround neovide settings with UIEnter event, helps remote connections 2024-07-31 12:04:05 +02:00
6746dd6fbe Merge remote-tracking branch 'modular/master' 2024-07-31 12:03:52 +02:00
Damjan 9000
0a274ab66c Merge 'upstream' refactor lazydev, defer clipboard
performance: defer clipboard because xsel and pbcopy can be slow
refactor: remove lazydev and luvit-meta as lsp dependencies
2024-07-29 20:17:53 +02:00
abeldekat
84cc12354d
performance: defer clipboard because xsel and pbcopy can be slow (#1049) 2024-07-28 17:41:34 -04:00
Ihsan Tonuzi
fd66454c4a
refactor: remove lazydev and luvit-meta as lsp dependencies (#1047) 2024-07-28 17:39:34 -04:00
Damjan 9000
5a2930fe62 Merge 'upstream' conform warning, redundant hlsearch
Modify conform comments to prevent deprecation warning when used
Remove redundant hlsearch option
2024-07-28 20:50:15 +02:00
Brandon Clark
1cef2325e0
Modify conform comments to prevent deprecation warning when used (#1057) 2024-07-28 12:43:08 -04:00
Arvin Verain
f00b2866de
Remove redundant hlsearch option (#1058) 2024-07-28 12:39:54 -04:00
4 changed files with 36 additions and 28 deletions

View File

@ -1,8 +1,8 @@
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
-- Set highlight on search, but clear on pressing <Esc> in normal mode -- Clear highlights on search when pressing <Esc> in normal mode
vim.opt.hlsearch = true -- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>') vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps -- Diagnostic keymaps

View File

@ -30,9 +30,8 @@ return {
-- Conform can also run multiple formatters sequentially -- Conform can also run multiple formatters sequentially
python = { 'isort', 'black' }, python = { 'isort', 'black' },
-- You can use a sub-list to tell conform to run *until* a formatter -- You can use 'stop_after_first' to run the first available formatter from the list
-- is found. javascript = { 'prettierd', 'prettier', stop_after_first = true },
javascript = { { 'prettierd', 'prettier' } },
}, },
}, },
}, },

View File

@ -1,19 +1,8 @@
-- LSP Plugins
return { return {
{ -- LSP Configuration & Plugins {
'neovim/nvim-lspconfig',
dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
-- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis -- used for completion, annotations and signatures of Neovim apis
{
'folke/lazydev.nvim', 'folke/lazydev.nvim',
ft = 'lua', ft = 'lua',
opts = { opts = {
@ -24,6 +13,18 @@ return {
}, },
}, },
{ 'Bilal2453/luvit-meta', lazy = true }, { 'Bilal2453/luvit-meta', lazy = true },
{
-- Main LSP Configuration
'neovim/nvim-lspconfig',
dependencies = {
-- Automatically install LSPs and related tools to stdpath for Neovim
{ 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants
'williamboman/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
-- Useful status updates for LSP.
-- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})`
{ 'j-hui/fidget.nvim', opts = {} },
}, },
config = function() config = function()
-- Brief aside: **What is LSP?** -- Brief aside: **What is LSP?**

View File

@ -38,9 +38,12 @@ vim.opt.mouse = 'a'
vim.opt.showmode = false vim.opt.showmode = false
-- Sync clipboard between OS and Neovim. -- Sync clipboard between OS and Neovim.
-- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent. -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.schedule(function()
vim.opt.clipboard = 'unnamedplus' vim.opt.clipboard = 'unnamedplus'
end)
-- Enable break indent -- Enable break indent
vim.opt.breakindent = true vim.opt.breakindent = true
@ -89,6 +92,9 @@ vim.opt.sidescrolloff = 12
-- Set cursor pointer to block -- Set cursor pointer to block
vim.opt.guicursor = 'n-v-i-c:block-Cursor' vim.opt.guicursor = 'n-v-i-c:block-Cursor'
vim.api.nvim_create_autocmd('UIEnter', {
group = vim.api.nvim_create_augroup('SetGUISettings', { clear = true }),
callback = function()
-- Options specifically targeted at Neovide -- Options specifically targeted at Neovide
if vim.g.neovide then if vim.g.neovide then
vim.o.guifont = 'CaskaydiaCove Nerd Font Mono:h14' vim.o.guifont = 'CaskaydiaCove Nerd Font Mono:h14'
@ -96,5 +102,7 @@ if vim.g.neovide then
vim.g.neovide_cursor_animation_length = 0 vim.g.neovide_cursor_animation_length = 0
vim.g.neovide_cursor_trail_length = 0 vim.g.neovide_cursor_trail_length = 0
end end
end,
})
-- vim: ts=2 sts=2 sw=2 et -- vim: ts=2 sts=2 sw=2 et