Compare commits
2 Commits
d0b09c2729
...
59620cb762
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59620cb762 | ||
|
|
6bfefcb865 |
50
init.lua
50
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',
|
||||||
@@ -255,31 +232,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 +376,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,
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user