Compare commits
3 Commits
d0b09c2729
...
tweaking-t
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d142d85498 | ||
|
|
59620cb762 | ||
|
|
6bfefcb865 |
74
init.lua
74
init.lua
@@ -41,25 +41,9 @@ rtp:prepend(lazypath)
|
|||||||
-- To update plugins you can run
|
-- To update plugins you can run
|
||||||
-- :Lazy update
|
-- :Lazy update
|
||||||
--
|
--
|
||||||
-- NOTE: Here is where you install your plugins.
|
|
||||||
require('lazy').setup({
|
require('lazy').setup({
|
||||||
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
|
|
||||||
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
|
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically
|
||||||
|
|
||||||
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
|
||||||
--
|
|
||||||
-- This is often very useful to both group configuration, as well as handle
|
|
||||||
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
|
||||||
--
|
|
||||||
-- For example, in the following configuration, we use:
|
|
||||||
-- event = 'VimEnter'
|
|
||||||
--
|
|
||||||
-- which loads which-key before all the UI elements are loaded. Events can be
|
|
||||||
-- normal autocommands events (`:help autocmd-events`).
|
|
||||||
--
|
|
||||||
-- Then, because we use the `opts` key (recommended), the configuration runs
|
|
||||||
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
|
||||||
|
|
||||||
{ -- Useful plugin to show you pending keybinds.
|
{ -- Useful plugin to show you pending keybinds.
|
||||||
'folke/which-key.nvim',
|
'folke/which-key.nvim',
|
||||||
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
|
||||||
@@ -113,13 +97,6 @@ require('lazy').setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- NOTE: Plugins can specify dependencies.
|
|
||||||
--
|
|
||||||
-- The dependencies are proper plugin specifications as well - anything
|
|
||||||
-- you do for a plugin at the top level, you can do for a dependency.
|
|
||||||
--
|
|
||||||
-- Use the `dependencies` key to specify the dependencies of a particular plugin
|
|
||||||
|
|
||||||
{ -- Fuzzy Finder (files, lsp, etc)
|
{ -- Fuzzy Finder (files, lsp, etc)
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
event = 'VimEnter',
|
event = 'VimEnter',
|
||||||
@@ -168,13 +145,33 @@ require('lazy').setup({
|
|||||||
require('telescope').setup {
|
require('telescope').setup {
|
||||||
-- You can put your default mappings / updates / etc. in here
|
-- You can put your default mappings / updates / etc. in here
|
||||||
-- All the info you're looking for is in `:help telescope.setup()`
|
-- All the info you're looking for is in `:help telescope.setup()`
|
||||||
--
|
|
||||||
defaults = {
|
defaults = {
|
||||||
mappings = {
|
mappings = {
|
||||||
i = { ['<c-enter>'] = 'to_fuzzy_refine' },
|
i = { ['<c-enter>'] = 'to_fuzzy_refine' },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- pickers = {}
|
pickers = {
|
||||||
|
find_files = {
|
||||||
|
theme = 'ivy',
|
||||||
|
},
|
||||||
|
grep_string = {
|
||||||
|
theme = 'ivy',
|
||||||
|
},
|
||||||
|
live_grep = {
|
||||||
|
theme = 'ivy',
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
theme = 'ivy',
|
||||||
|
},
|
||||||
|
oldfiles = {
|
||||||
|
theme = 'ivy',
|
||||||
|
},
|
||||||
|
buffers = {
|
||||||
|
theme = 'dropdown',
|
||||||
|
previewer = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
extensions = {
|
extensions = {
|
||||||
['ui-select'] = {
|
['ui-select'] = {
|
||||||
require('telescope.themes').get_dropdown(),
|
require('telescope.themes').get_dropdown(),
|
||||||
@@ -255,31 +252,6 @@ require('lazy').setup({
|
|||||||
'saghen/blink.cmp',
|
'saghen/blink.cmp',
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Brief aside: **What is LSP?**
|
|
||||||
--
|
|
||||||
-- LSP is an initialism you've probably heard, but might not understand what it is.
|
|
||||||
--
|
|
||||||
-- LSP stands for Language Server Protocol. It's a protocol that helps editors
|
|
||||||
-- and language tooling communicate in a standardized fashion.
|
|
||||||
--
|
|
||||||
-- In general, you have a "server" which is some tool built to understand a particular
|
|
||||||
-- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers
|
|
||||||
-- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone
|
|
||||||
-- processes that communicate with some "client" - in this case, Neovim!
|
|
||||||
--
|
|
||||||
-- LSP provides Neovim with features like:
|
|
||||||
-- - Go to definition
|
|
||||||
-- - Find references
|
|
||||||
-- - Autocompletion
|
|
||||||
-- - Symbol Search
|
|
||||||
-- - and more!
|
|
||||||
--
|
|
||||||
-- Thus, Language Servers are external tools that must be installed separately from
|
|
||||||
-- Neovim. This is where `mason` and related plugins come into play.
|
|
||||||
--
|
|
||||||
-- If you're wondering about lsp vs treesitter, you can check out the wonderfully
|
|
||||||
-- and elegantly composed help section, `:help lsp-vs-treesitter`
|
|
||||||
|
|
||||||
-- This function gets run when an LSP attaches to a particular buffer.
|
-- This function gets run when an LSP attaches to a particular buffer.
|
||||||
-- That is to say, every time a new file is opened that is associated with
|
-- That is to say, every time a new file is opened that is associated with
|
||||||
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
|
-- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this
|
||||||
@@ -424,8 +396,6 @@ require('lazy').setup({
|
|||||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
||||||
|
|
||||||
-- Enable the following language servers
|
-- Enable the following language servers
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
|
||||||
--
|
|
||||||
-- Add any additional override configuration in the following tables. Available keys are:
|
-- Add any additional override configuration in the following tables. Available keys are:
|
||||||
-- - cmd (table): Override the default command used to start the server
|
-- - cmd (table): Override the default command used to start the server
|
||||||
-- - filetypes (table): Override the default list of associated filetypes for the server
|
-- - filetypes (table): Override the default list of associated filetypes for the server
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
return {
|
|
||||||
'ray-x/lsp_signature.nvim',
|
|
||||||
event = 'InsertEnter',
|
|
||||||
opts = {
|
|
||||||
bind = true,
|
|
||||||
doc_lines = 0,
|
|
||||||
close_timeout = 1000,
|
|
||||||
handler_opts = {
|
|
||||||
border = 'rounded',
|
|
||||||
},
|
|
||||||
toggle_key = '<C-k>',
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
require('lsp_signature').setup(opts)
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -17,16 +17,16 @@ return {
|
|||||||
|
|
||||||
local keymap = {
|
local keymap = {
|
||||||
['<C-u>'] = function()
|
['<C-u>'] = function()
|
||||||
neoscroll.ctrl_u { duration = 150 }
|
neoscroll.ctrl_u { duration = 100 }
|
||||||
end,
|
end,
|
||||||
['<C-d>'] = function()
|
['<C-d>'] = function()
|
||||||
neoscroll.ctrl_d { duration = 150 }
|
neoscroll.ctrl_d { duration = 100 }
|
||||||
end,
|
end,
|
||||||
['<C-b>'] = function()
|
['<C-b>'] = function()
|
||||||
neoscroll.ctrl_b { duration = 300 }
|
neoscroll.ctrl_b { duration = 100 }
|
||||||
end,
|
end,
|
||||||
['<C-f>'] = function()
|
['<C-f>'] = function()
|
||||||
neoscroll.ctrl_f { duration = 300 }
|
neoscroll.ctrl_f { duration = 100 }
|
||||||
end,
|
end,
|
||||||
['zt'] = function()
|
['zt'] = function()
|
||||||
neoscroll.zt { half_win_duration = 150 }
|
neoscroll.zt { half_win_duration = 150 }
|
||||||
|
|||||||
Reference in New Issue
Block a user