Skip to content

Commit 7c3a4bd

Browse files
committed
Removing some unnecessary comments and lines
1 parent 84120d1 commit 7c3a4bd

11 files changed

Lines changed: 26 additions & 142 deletions

File tree

lua/custom/plugins/init.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
-- You can add your own plugins here or in other files in this directory!
2-
-- I promise not to create any merge conflicts in this directory :)
3-
--
4-
-- See the kickstart.nvim README for more information
51
return {}

lua/custom/plugins/mason-workaround.lua

Lines changed: 0 additions & 10 deletions
This file was deleted.

lua/custom/plugins/oil.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ return {
33
---@module 'oil'
44
---@type oil.SetupOpts
55
opts = {},
6-
-- Optional dependencies
76
dependencies = { { 'nvim-mini/mini.icons', opts = {} } },
87
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
9-
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
108
lazy = false,
119
}

lua/custom/plugins/snacks.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@ return {
44
lazy = false,
55
---@type snacks.Config
66
opts = {
7-
-- your configuration comes here
8-
-- or leave it empty to use the default settings
9-
-- refer to the configuration section below
107
bigfile = { enabled = true },
11-
--dashboard = { enabled = true },
128
input = { enabled = true },
13-
--notifier = { enabled = true },
149
statuscolumn = { enabled = true },
1510
},
1611
}

lua/custom/plugins/trouble.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
return {
22
'folke/trouble.nvim',
3-
opts = {}, -- for default options, refer to the configuration section for custom setup.
3+
opts = {},
44
cmd = 'Trouble',
55
keys = {
66
{
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
return {
22
'windwp/nvim-ts-autotag',
33
-- event = { 'BufReadPre', 'BufNewFile' },
4-
opts = {
5-
-- Defaults
6-
-- enable_close = true, -- Auto close tags
7-
-- enable_rename = true, -- Auto rename pairs of tags
8-
-- enable_close_on_slash = false, -- Auto close on trailing </
9-
},
10-
-- config = function(_, opts)
11-
-- require('nvim-ts-autotag').setup(opts)
12-
-- end,
4+
-- opts = {
5+
-- Defaults
6+
-- enable_close = true, -- Auto close tags
7+
-- enable_rename = true, -- Auto rename pairs of tags
8+
-- enable_close_on_slash = false, -- Auto close on trailing </
9+
-- },
10+
config = function(_, opts)
11+
require('nvim-ts-autotag').setup(opts)
12+
end,
1313
}

lua/kickstart/plugins/blink-cmp.lua

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ return {
4747
-- For an understanding of why the 'default' preset is recommended,
4848
-- you will need to read `:help ins-completion`
4949
--
50-
-- No, but seriously. Please read `:help ins-completion`, it is really good!
51-
--
5250
-- All presets have the following mappings:
5351
-- <tab>/<s-tab>: move to right/left of your snippet expansion
5452
-- <c-space>: Open menu or open docs if already open
@@ -58,39 +56,32 @@ return {
5856
--
5957
-- See :h blink-cmp-config-keymap for defining your own keymap
6058
preset = 'default',
61-
6259
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
6360
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
6461
['<CR>'] = { 'accept', 'fallback' },
6562
},
66-
6763
appearance = {
6864
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
6965
-- Adjusts spacing to ensure icons are aligned
7066
nerd_font_variant = 'mono',
7167
},
72-
7368
completion = {
7469
-- By default, you may press `<c-space>` to show the documentation.
7570
-- Optionally, set `auto_show = true` to show the documentation after a delay.
7671
documentation = { auto_show = false, auto_show_delay_ms = 500 },
7772
},
78-
7973
sources = {
8074
default = { 'lsp', 'path', 'snippets', 'lazydev' },
8175
providers = {
8276
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
8377
},
8478
},
85-
8679
snippets = { preset = 'luasnip' },
8780

8881
-- Blink.cmp includes an optional, recommended rust fuzzy matcher,
8982
-- which automatically downloads a prebuilt binary when enabled.
90-
--
9183
-- By default, we use the Lua implementation instead, but you may enable
9284
-- the rust implementation via `'prefer_rust_with_warning'`
93-
--
9485
-- See :h blink-cmp-config-fuzzy for more information
9586
fuzzy = { implementation = 'lua' },
9687

lua/kickstart/plugins/lspconfig.lua

Lines changed: 12 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,15 @@ return {
3030
{ 'j-hui/fidget.nvim', opts = {} },
3131

3232
-- Allows extra capabilities provided by blink.cmp
33+
-- Already installed in another file
3334
'saghen/blink.cmp',
3435
},
3536
config = function()
3637
-- Brief aside: **What is LSP?**
3738
--
38-
-- LSP is an initialism you've probably heard, but might not understand what it is.
39-
--
4039
-- LSP stands for Language Server Protocol. It's a protocol that helps editors
4140
-- and language tooling communicate in a standardized fashion.
4241
--
43-
-- In general, you have a "server" which is some tool built to understand a particular
44-
-- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers
45-
-- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone
46-
-- processes that communicate with some "client" - in this case, Neovim!
47-
--
4842
-- LSP provides Neovim with features like:
4943
-- - Go to definition
5044
-- - Find references
@@ -65,11 +59,6 @@ return {
6559
vim.api.nvim_create_autocmd('LspAttach', {
6660
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }),
6761
callback = function(event)
68-
-- NOTE: Remember that Lua is a real programming language, and as such it is possible
69-
-- to define small helper and utility functions so you don't have to repeat yourself.
70-
--
71-
-- In this case, we create a function that lets us more easily define mappings specific
72-
-- for LSP related items. It sets the mode, buffer and description for us each time.
7362
local map = function(keys, func, desc, mode)
7463
mode = mode or 'n'
7564
vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc })
@@ -84,18 +73,15 @@ return {
8473
map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' })
8574

8675
-- Find references for the word under your cursor.
87-
-- map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
8876
map('grr', require('fzf-lua').lsp_references, '[G]oto [R]eferences')
8977

9078
-- Jump to the implementation of the word under your cursor.
9179
-- Useful when your language has ways of declaring types without an actual implementation.
92-
-- map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
9380
map('gri', require('fzf-lua').lsp_implementations, '[G]oto [I]mplementation')
9481

9582
-- Jump to the definition of the word under your cursor.
9683
-- This is where a variable was first declared, or where a function is defined, etc.
9784
-- To jump back, press <C-t>.
98-
-- map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
9985
map('grd', require('fzf-lua').lsp_definitions, '[G]oto [D]efinition')
10086

10187
-- WARN: This is not Goto Definition, this is Goto Declaration.
@@ -104,18 +90,15 @@ return {
10490

10591
-- Fuzzy find all the symbols in your current document.
10692
-- Symbols are things like variables, functions, types, etc.
107-
-- map('gO', require('telescope.builtin').lsp_document_symbols, 'Open Document Symbols')
10893
map('gO', require('fzf-lua').lsp_document_symbols, 'Open Document Symbols')
10994

11095
-- Fuzzy find all the symbols in your current workspace.
11196
-- Similar to document symbols, except searches over your entire project.
112-
-- map('gW', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Open Workspace Symbols')
11397
map('gW', require('fzf-lua').lsp_workspace_symbols, 'Open Workspace Symbols')
11498

11599
-- Jump to the type of the word under your cursor.
116100
-- Useful when you're not sure what type a variable is and you want to see
117101
-- the definition of its *type*, not where it was *defined*.
118-
-- map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition')
119102
map('grt', require('fzf-lua').lsp_typedefs, '[G]oto [T]ype Definition')
120103

121104
-- The following two autocommands are used to highlight references of the
@@ -129,7 +112,6 @@ return {
129112
group = highlight_augroup,
130113
callback = vim.lsp.buf.document_highlight,
131114
})
132-
133115
-- When you move your cursor, the highlights will be cleared
134116
vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, {
135117
buffer = event.buf,
@@ -148,7 +130,6 @@ return {
148130

149131
-- The following code creates a keymap to toggle inlay hints in your
150132
-- code, if the language server you are using supports them
151-
--
152133
-- This may be unwanted, since they displace some of your code
153134
if client and client:supports_method('textDocument/inlayHint', event.buf) then
154135
map('<leader>th', function()
@@ -191,51 +172,33 @@ return {
191172
-- By default, Neovim doesn't support everything that is in the LSP specification.
192173
-- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities.
193174
-- So, we create new capabilities with blink.cmp, and then broadcast that to the servers.
194-
-- local capabilities = require('blink.cmp').get_lsp_capabilities()
175+
local capabilities = require('blink.cmp').get_lsp_capabilities()
176+
vim.lsp.config('*', { capabilities = capabilities })
195177

196178
-- Add any additional override configuration in the following tables. Available keys are:
197179
-- - cmd (table): Override the default command used to start the server
198180
-- - filetypes (table): Override the default list of associated filetypes for the server
199181
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
200182
-- - settings (table): Override the default settings passed when initializing the server.
201183
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
184+
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
202185
local servers = {
203186
clangd = {},
204187
gopls = {},
205188
pyright = {},
206189
rust_analyzer = {},
207-
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
208190
stylua = {},
209191
lua_ls = {
210192
-- cmd = { ... },
211193
-- filetypes = { ... },
212194
-- capabilities = {},
213-
on_init = function(client)
214-
if client.workspace_folders then
215-
local path = client.workspace_folders[1].name
216-
if path ~= vim.fn.stdpath 'config' and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc')) then
217-
return
218-
end
219-
end
220-
221-
-- client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
222-
-- runtime = {
223-
-- version = 'LuaJIT',
224-
-- path = { 'lua/?.lua', 'lua/?/init.lua' },
225-
-- },
226-
-- workspace = {
227-
-- checkThirdParty = false,
228-
-- -- NOTE: this is a lot slower and will cause issues when working on your own configuration.
229-
-- -- See https://github.com/neovim/nvim-lspconfig/issues/3189
230-
-- library = vim.tbl_extend('force', vim.api.nvim_get_runtime_file('', true), {
231-
-- '${3rd}/luv/library',
232-
-- '${3rd}/busted/library',
233-
-- }),
234-
-- },
235-
-- })
236-
end,
195+
-- on_init = function(client)
196+
-- end,
237197
settings = {
238198
Lua = {
199+
runtime = {
200+
version = 'LuaJIT',
201+
},
239202
completion = {
240203
callSnippet = 'Replace',
241204
},
@@ -248,17 +211,13 @@ return {
248211
},
249212
},
250213
ts_ls = {},
251-
-- TODO: make biome work as lsp fot ts, js, tsx, jsx files instead of ts_ls
214+
-- TODO: make biome work as lsp for ts, js, tsx, jsx files instead of ts_ls
252215
biome = {
253-
-- cmd = { 'biome', 'lsp-proxy' },
254-
-- root_dir = require('lspconfig').util.root_pattern('package.json', '.git'),
216+
-- cmd = { 'biome', 'lsp-proxy' },
217+
-- root_dir = require('lspconfig').util.root_pattern('package.json', '.git'),
255218
},
256219
}
257220

258-
-- Ensure the servers and tools above are installed
259-
-- To check the current status of installed tools and/or manually install
260-
-- other tools, you can run
261-
-- :Mason
262221
local ensure_installed = vim.tbl_keys(servers or {})
263222
vim.list_extend(ensure_installed, {
264223
-- add any other tools we want from mason

lua/kickstart/plugins/treesitter.lua

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ return {
55
branch = 'main',
66
build = ':TSUpdate',
77
opts = {},
8-
-- dependencies = {
9-
-- 'windwp/nvim-ts-autotag', -- auto close tsx tags
10-
-- },
11-
-- opts = {
12-
-- autotag = {
13-
-- -- Setup autotag using treesitter config.
14-
-- enable = true,
15-
-- },
16-
-- },
178
-- main = 'nvim-treesitter.configs', -- Sets main module to use for opts
189
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
1910
config = function(_, opts)
@@ -35,9 +26,10 @@ return {
3526
'elixir',
3627
'toml',
3728
'yaml',
38-
'ecma',
3929
'typescript',
30+
'javascript',
4031
'tsx',
32+
'jsx',
4133
}
4234
local alreadyInstalled = require('nvim-treesitter').get_installed 'parsers'
4335
local parsersToInstall = vim
@@ -46,7 +38,7 @@ return {
4638
return not vim.tbl_contains(alreadyInstalled, parser)
4739
end)
4840
:totable()
49-
-- print(parsersToInstall)
41+
5042
if #parsersToInstall > 0 then
5143
require('nvim-treesitter').install(parsersToInstall)
5244
end
@@ -58,7 +50,6 @@ return {
5850
group = vim.api.nvim_create_augroup('EnableTreesitterHighlighting', { clear = true }),
5951
pattern = filetypes,
6052
callback = function(event)
61-
print(event.buf)
6253
local parser_installed = pcall(vim.treesitter.get_parser, event.buf, parser)
6354
if parser_installed then
6455
pcall(vim.treesitter.start, event.buf, parser)
@@ -73,11 +64,6 @@ return {
7364
end
7465
end
7566
end,
76-
-- There are additional nvim-treesitter modules that you can use to interact
77-
-- with nvim-treesitter. You should go explore a few and see what interests you:
78-
--
79-
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
80-
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
8167
},
8268
{
8369
'nvim-treesitter/nvim-treesitter-textobjects',

0 commit comments

Comments
 (0)