Skip to content

Commit 48c85c0

Browse files
author
lootboxer
committed
Added some configs and plugins
1 parent b784632 commit 48c85c0

File tree

6 files changed

+99
-102
lines changed

6 files changed

+99
-102
lines changed

init.lua

Lines changed: 64 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@ vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower win
206206
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
207207

208208
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
209-
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
210-
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
211-
-- vim.keymap.set("n", "<C-S-j>", "<C-w>J", { desc = "Move window to the lower" })
212-
-- vim.keymap.set("n", "<C-S-k>", "<C-w>K", { desc = "Move window to the upper" })
209+
vim.keymap.set('n', '<C-S-h>', '<C-w>H', { desc = 'Move window to the left' })
210+
vim.keymap.set('n', '<C-S-l>', '<C-w>L', { desc = 'Move window to the right' })
211+
vim.keymap.set('n', '<C-S-j>', '<C-w>J', { desc = 'Move window to the lower' })
212+
vim.keymap.set('n', '<C-S-k>', '<C-w>K', { desc = 'Move window to the upper' })
213213

214214
-- [[ Basic Autocommands ]]
215215
-- See `:help lua-guide-autocommands`
@@ -690,31 +690,14 @@ require('lazy').setup({
690690
-- ts_ls = {},
691691
--
692692
-- Vue 3
693-
volar = {
693+
--
694+
vuels = {
695+
filetypes = { 'vue', 'javascript', 'typescript' },
694696
init_options = {
695-
vue = {
696-
hybridMode = false,
697-
},
698-
},
699-
settings = {
700-
typescript = {
701-
inlayHints = {
702-
enumMemberValues = {
703-
enabled = true,
704-
},
705-
functionLikeReturnTypes = {
706-
enabled = true,
707-
},
708-
propertyDeclarationTypes = {
709-
enabled = true,
710-
},
711-
parameterTypes = {
712-
enabled = true,
713-
suppressWhenArgumentMatchesName = true,
714-
},
715-
variableTypes = {
716-
enabled = true,
717-
},
697+
config = {
698+
vetur = { -- For Vue 2 compatibility (optional)
699+
validation = { template = true, script = true, style = true },
700+
format = { enable = false }, -- Disable if using Prettier
718701
},
719702
},
720703
},
@@ -732,9 +715,6 @@ require('lazy').setup({
732715
},
733716
settings = {
734717
typescript = {
735-
tsserver = {
736-
useSyntaxServer = false,
737-
},
738718
inlayHints = {
739719
includeInlayParameterNameHints = 'all',
740720
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
@@ -747,6 +727,7 @@ require('lazy').setup({
747727
},
748728
},
749729
},
730+
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
750731
},
751732
lua_ls = {
752733
-- cmd = { ... },
@@ -765,6 +746,10 @@ require('lazy').setup({
765746

766747
-- python lsp
767748
pyright = {},
749+
-- CSS/SCSS LSP
750+
cssls = {
751+
filetypes = { 'css', 'scss', 'sass' },
752+
},
768753
}
769754

770755
-- Ensure the servers and tools above are installed
@@ -784,10 +769,16 @@ require('lazy').setup({
784769
vim.list_extend(ensure_installed, {
785770
'stylua', -- Used to format Lua code
786771
})
772+
vim.filetype.add {
773+
extension = {
774+
vue = 'vue',
775+
},
776+
}
787777
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
788778

789779
require('mason-lspconfig').setup {
790-
ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
780+
ensure_installed = { 'vuels', 'lua_ls' }, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer)
781+
automatic_enable = true,
791782
automatic_installation = false,
792783
handlers = {
793784
function(server_name)
@@ -839,7 +830,7 @@ require('lazy').setup({
839830
-- python = { "isort", "black" },
840831
--
841832
-- You can use 'stop_after_first' to run the first available formatter from the list
842-
-- javascript = { "prettierd", "prettier", stop_after_first = true },
833+
-- javascript = { 'prettierd', 'prettier', stop_after_first = true },
843834
},
844835
},
845836
},
@@ -866,16 +857,18 @@ require('lazy').setup({
866857
-- `friendly-snippets` contains a variety of premade snippets.
867858
-- See the README about individual language/framework/plugin snippets:
868859
-- https://github.com/rafamadriz/friendly-snippets
869-
{
870-
'rafamadriz/friendly-snippets',
871-
config = function()
872-
require('luasnip.loaders.from_vscode').lazy_load()
873-
end,
874-
},
860+
-- {
861+
-- 'rafamadriz/friendly-snippets',
862+
-- config = function()
863+
-- require('luasnip.loaders.from_vscode').lazy_load()
864+
-- end,
865+
-- },
875866
},
876867
opts = {},
877868
},
878869
'folke/lazydev.nvim',
870+
-- custom deps
871+
'Kaiser-Yang/blink-cmp-avante',
879872
},
880873
--- @module 'blink.cmp'
881874
--- @type blink.cmp.Config
@@ -911,6 +904,7 @@ require('lazy').setup({
911904
else
912905
return cmp.select_and_accept()
913906
end
907+
vim.api.nvim_command '<Esc>'
914908
end,
915909
'snippet_forward',
916910
'fallback',
@@ -936,9 +930,16 @@ require('lazy').setup({
936930
},
937931

938932
sources = {
939-
default = { 'lsp', 'path', 'snippets', 'lazydev' },
933+
default = { 'lsp', 'path', 'snippets', 'lazydev', 'avante' },
940934
providers = {
941935
lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 },
936+
avante = {
937+
module = 'blink-cmp-avante',
938+
name = 'Avante',
939+
opts = {
940+
-- options for blink-cmp-avante
941+
},
942+
},
942943
},
943944
},
944945

@@ -1011,6 +1012,7 @@ require('lazy').setup({
10111012
-- // custom mini plugins
10121013
--
10131014
require('mini.starter').setup()
1015+
-- require('mini.bufremove').setup()
10141016

10151017
-- Simple and easy statusline.
10161018
-- You could remove this setup call if you don't like it,
@@ -1037,7 +1039,24 @@ require('lazy').setup({
10371039
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
10381040
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
10391041
opts = {
1040-
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
1042+
ensure_installed = {
1043+
'bash',
1044+
'c',
1045+
'diff',
1046+
'html',
1047+
'lua',
1048+
'luadoc',
1049+
'markdown',
1050+
'markdown_inline',
1051+
'query',
1052+
'vim',
1053+
'vimdoc',
1054+
'html',
1055+
'javascript',
1056+
'typescript',
1057+
'tsx',
1058+
'vue',
1059+
},
10411060
-- Autoinstall languages that are not installed
10421061
auto_install = true,
10431062
highlight = {
@@ -1048,6 +1067,9 @@ require('lazy').setup({
10481067
additional_vim_regex_highlighting = { 'ruby' },
10491068
},
10501069
indent = { enable = true, disable = { 'ruby' } },
1070+
autotag = {
1071+
enabled = true,
1072+
},
10511073
},
10521074
-- There are additional nvim-treesitter modules that you can use to interact
10531075
-- with nvim-treesitter. You should go explore a few and see what interests you:
@@ -1069,9 +1091,9 @@ require('lazy').setup({
10691091
-- require 'kickstart.plugins.debug',
10701092
require 'kickstart.plugins.indent_line',
10711093
require 'kickstart.plugins.lint',
1072-
require 'kickstart.plugins.autopairs',
10731094
require 'kickstart.plugins.neo-tree',
10741095
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
1096+
require 'kickstart.plugins.nvim-ts-autotag', -- adds nvim-ts-autotag
10751097

10761098
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
10771099
-- This is the easiest way to modularize your config.

lua/custom/keybindings.lua

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
vim.keymap.set('i', 'jk', '<Esc>', { desc = 'escape' })
44
vim.keymap.set('i', 'kj', '<Esc>', { desc = 'escape' })
55

6-
-- Перемещение между буферами
7-
vim.keymap.set('n', '<Tab>', '<Cmd>BufferLineCycleNext<CR>')
8-
vim.keymap.set('n', '<S-Tab>', '<Cmd>BufferLineCyclePrev<CR>')
9-
106
vim.keymap.set('n', ',,', '<Cmd>ToggleTerm<CR>', { desc = 'Open terminal in horizontal split' })
117
vim.keymap.set('t', ',,', '<Cmd>ToggleTerm<CR>', { desc = 'Open terminal in horizontal split' })
128

13-
-- Закрыть буфер
14-
vim.keymap.set('n', '<C-q>', '<Cmd>bdelete<CR>')
9+
-- vim.keymap.set('n', '<C-q>', '<Cmd>bdelete<CR>')
1510

16-
-- Переход к буферу по номеру (например, Alt+1, Alt+2...)
11+
-- Change buffer by number (example Alt+1, Alt+2...)
1712
for i = 1, 9 do
1813
vim.keymap.set('n', '<M-' .. i .. '>', '<Cmd>BufferLineGoToBuffer ' .. i .. '<CR>')
1914
end

lua/custom/plugins/init.lua

Lines changed: 27 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,15 @@ return {
77

88
event = 'VeryLazy',
99
keys = {
10-
{ '<leader>bp', '<Cmd>BufferLineTogglePin<CR>', desc = 'Toggle Pin' },
11-
{ '<leader>bP', '<Cmd>BufferLineGroupClose ungrouped<CR>', desc = 'Delete Non-Pinned Buffers' },
12-
{ '<leader>br', '<Cmd>BufferLineCloseRight<CR>', desc = 'Delete Buffers to the Right' },
13-
{ '<leader>bl', '<Cmd>BufferLineCloseLeft<CR>', desc = 'Delete Buffers to the Left' },
14-
{ '<S-j>', '<cmd>BufferLineCyclePrev<cr>', desc = 'Prev Buffer' },
15-
{ '<S-k>', '<cmd>BufferLineCycleNext<cr>', desc = 'Next Buffer' },
10+
{ '<S-h>', '<cmd>BufferLineCyclePrev<cr>', desc = 'Prev Buffer' },
11+
{ '<S-l>', '<cmd>BufferLineCycleNext<cr>', desc = 'Next Buffer' },
1612
{ '<S-C-j>', '<cmd>BufferLineMovePrev<cr>', desc = 'Move buffer prev' },
1713
{ '<S-C-k>', '<cmd>BufferLineMoveNext<cr>', desc = 'Move buffer next' },
18-
{ '[b', '<cmd>BufferLineCyclePrev<cr>', desc = 'Prev Buffer' },
19-
{ ']b', '<cmd>BufferLineCycleNext<cr>', desc = 'Next Buffer' },
20-
{ '[B', '<cmd>BufferLineMovePrev<cr>', desc = 'Move buffer prev' },
21-
{ ']B', '<cmd>BufferLineMoveNext<cr>', desc = 'Move buffer next' },
2214
},
2315
opts = {
2416
options = {
25-
-- stylua: ignore
26-
-- // close_command = require('bufdelete').bufdelete,
27-
-- stylua: ignore
28-
-- // right_mouse_command = require('bufdelete').bufdelete,
2917
diagnostics = 'nvim_lsp',
30-
always_show_bufferline = false,
18+
always_show_bufferline = true,
3119
diagnostics_indicator = function(count, level, diagnostics_dict, context)
3220
local icon = level:match 'error' and '' or ''
3321
return ' ' .. icon .. count
@@ -47,17 +35,6 @@ return {
4735
color_icons = true,
4836
},
4937
},
50-
config = function(_, opts)
51-
require('bufferline').setup(opts)
52-
-- Fix bufferline when restoring a session
53-
vim.api.nvim_create_autocmd({ 'BufAdd', 'BufDelete' }, {
54-
callback = function()
55-
vim.schedule(function()
56-
pcall(nvim_bufferline)
57-
end)
58-
end,
59-
})
60-
end,
6138
},
6239
{
6340
'mattn/emmet-vim',
@@ -67,28 +44,13 @@ return {
6744
event = 'VeryLazy',
6845
version = false, -- Never set this value to "*"! Never!
6946
opts = {
70-
provider = 'openrouter',
71-
vendors = {
72-
openai = {
73-
endpoint = 'https://api.openai.com/v1',
74-
model = 'gpt-4o', -- your desired model (or use gpt-4o, etc.)
75-
timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
76-
temperature = 0,
77-
max_completion_tokens = 8192, -- Increase this to include reasoning tokens (for reasoning models)
78-
--reasoning_effort = "medium", -- low|medium|high, only used for reasoning models
79-
},
47+
provider = 'deepseek',
48+
providers = {
8049
deepseek = {
8150
__inherited_from = 'openai',
8251
api_key_name = 'DEEPSEEK_API_KEY',
83-
api_endpoint = 'https://api.deepseek.com',
52+
endpoint = 'https://api.deepseek.com',
8453
model = 'deepseek-coder',
85-
max_tokens = 200,
86-
},
87-
openrouter = {
88-
__inherited_from = 'openai',
89-
endpoint = 'https://openrouter.ai/api/v1',
90-
api_key_name = 'OPENROUTER_API_KEY',
91-
model = 'mistralai/mistral-7b-instruct:free',
9254
},
9355
},
9456
},
@@ -136,4 +98,25 @@ return {
13698
},
13799
},
138100
{ 'akinsho/toggleterm.nvim', version = '*', opts = {} },
101+
{
102+
'antosha417/nvim-lsp-file-operations',
103+
dependencies = {
104+
'nvim-lua/plenary.nvim',
105+
-- Uncomment whichever supported plugin(s) you use
106+
-- "nvim-tree/nvim-tree.lua",
107+
'nvim-neo-tree/neo-tree.nvim',
108+
-- "simonmclean/triptych.nvim"
109+
},
110+
config = function()
111+
require('lsp-file-operations').setup()
112+
end,
113+
},
114+
{
115+
'nvim-treesitter/nvim-treesitter',
116+
dependencies = {
117+
-- Add nvim-ts-autotag
118+
{ 'windwp/nvim-ts-autotag' },
119+
},
120+
opts = {},
121+
},
139122
}

lua/kickstart/plugins/autopairs.lua

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

lua/kickstart/plugins/neo-tree.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ return {
4545
['<C-cr>'] = {
4646
'open',
4747
config = {
48-
open_command = 'tabnew', -- Альтернативный вариант параметра
48+
open_command = 'tabnew',
4949
},
5050
},
5151
['oa'] = 'avante_add_files',
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
return {
2+
'windwp/nvim-ts-autotag',
3+
event = 'InsertEnter',
4+
opts = {},
5+
}

0 commit comments

Comments
 (0)