Skip to content

Commit c162da2

Browse files
committed
change up/down
1 parent 9a444fa commit c162da2

File tree

3 files changed

+43
-19
lines changed

3 files changed

+43
-19
lines changed

after/plugin/lsp.lua

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@ lsp.preset("recommended")
44

55
lsp.ensure_installed({
66
'rust_analyzer',
7+
'svelte',
8+
'lua_ls',
9+
'pylsp',
10+
'java_language_server',
11+
'html',
712
})
813

914
-- Fix Undefined global 'vim'
1015
lsp.nvim_workspace()
1116

1217

1318
local cmp = require('cmp')
14-
local cmp_select = {behavior = cmp.SelectBehavior.Select}
19+
local cmp_select = { behavior = cmp.SelectBehavior.Select }
1520
local cmp_mappings = lsp.defaults.cmp_mappings({
16-
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
17-
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
21+
['<C-k>'] = cmp.mapping.select_prev_item(cmp_select),
22+
['<C-j>'] = cmp.mapping.select_next_item(cmp_select),
1823
['<C-y>'] = cmp.mapping.confirm({ select = true }),
1924
["<C-Space>"] = cmp.mapping.complete(),
2025
})
@@ -27,17 +32,17 @@ lsp.setup_nvim_cmp({
2732
})
2833

2934
lsp.set_preferences({
30-
suggest_lsp_servers = false,
31-
sign_icons = {
32-
error = 'E',
33-
warn = 'W',
34-
hint = 'H',
35-
info = 'I'
36-
}
35+
suggest_lsp_servers = false,
36+
sign_icons = {
37+
error = 'E',
38+
warn = 'W',
39+
hint = 'H',
40+
info = 'I'
41+
}
3742
})
3843

3944
lsp.on_attach(function(client, bufnr)
40-
local opts = {buffer = bufnr, remap = false}
45+
local opts = { buffer = bufnr, remap = false }
4146

4247
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
4348
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
@@ -54,6 +59,5 @@ end)
5459
lsp.setup()
5560

5661
vim.diagnostic.config({
57-
virtual_text = true
62+
virtual_text = true
5863
})
59-

after/plugin/treesitter.lua

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
1-
require'nvim-treesitter.configs'.setup {
1+
require 'nvim-treesitter.configs'.setup {
22
-- A list of parser names, or "all"
3-
ensure_installed = { "vimdoc", "javascript", "c", "lua", "rust" },
3+
ensure_installed = {
4+
"vimdoc",
5+
"javascript",
6+
"c",
7+
"lua",
8+
"rust",
9+
"eex",
10+
"heex",
11+
"elixir",
12+
"erlang",
13+
"json",
14+
"html",
15+
"python",
16+
"java",
17+
"typescript",
18+
"svelte",
19+
"bash",
20+
"lua",
21+
"vim",
22+
"dockerfile",
23+
"gitignore"
24+
},
425

526
-- Install parsers synchronously (only applied to `ensure_installed`)
627
sync_install = false,
@@ -20,4 +41,3 @@ require'nvim-treesitter.configs'.setup {
2041
additional_vim_regex_highlighting = false,
2142
},
2243
}
23-

lua/kyoto/set.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ vim.opt.guicursor = ""
33
vim.opt.nu = true
44
vim.opt.relativenumber = true
55

6-
vim.opt.tabstop = 4
7-
vim.opt.softtabstop = 4
8-
vim.opt.shiftwidth = 4
6+
vim.opt.tabstop = 2
7+
vim.opt.softtabstop = 2
8+
vim.opt.shiftwidth = 2
99
vim.opt.expandtab = true
1010

1111
vim.opt.smartindent = true

0 commit comments

Comments
 (0)