forward
This commit is contained in:
parent
0ee0b77537
commit
e7b64d1347
6 changed files with 77 additions and 70 deletions
|
@ -1,4 +1,12 @@
|
|||
vim.keymap.set("i", "<C-J>", [[copilot#Accept("<CR>")]], { noremap = true, silent = true, expr = true, script = true })
|
||||
local map = function(type, key, value, opts)
|
||||
local options = { noremap = true }
|
||||
if opts then
|
||||
options = vim.tbl_extend("force", options, opts)
|
||||
end
|
||||
vim.api.nvim_set_keymap(type, key, value, options)
|
||||
end
|
||||
|
||||
map("i", "<C-J>", [[copilot#Accept("<CR>")]], { noremap = true, silent = true, expr = true })
|
||||
|
||||
vim.g.copilot_no_tab_map = true
|
||||
vim.g.copilot_assume_mapped = true
|
||||
|
|
|
@ -182,71 +182,73 @@ lspconfig.yamlls.setup({
|
|||
},
|
||||
})
|
||||
|
||||
require("lspconfig").tsserver.setup({})
|
||||
|
||||
-- npm install -g typescript typescript-language-server
|
||||
require("lspconfig").tsserver.setup({
|
||||
on_attach = function(client, bufnr)
|
||||
client.resolved_capabilities.document_formatting = false
|
||||
on_attach(client)
|
||||
-- require("lspconfig").tsserver.setup({
|
||||
-- on_attach = function(client, bufnr)
|
||||
-- client.resolved_capabilities.document_formatting = false
|
||||
-- on_attach(client)
|
||||
|
||||
require("lsp_signature").on_attach({
|
||||
bind = false, -- This is mandatory, otherwise border config won't get registered.
|
||||
-- If you want to hook lspsaga or other signature handler, pls set to false
|
||||
doc_lines = 2, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
|
||||
-- set to 0 if you DO NOT want any API comments be shown
|
||||
-- This setting only take effect in insert mode, it does not affect signature help in normal
|
||||
-- mode, 10 by default
|
||||
-- require("lsp_signature").on_attach({
|
||||
-- bind = false, -- This is mandatory, otherwise border config won't get registered.
|
||||
-- -- If you want to hook lspsaga or other signature handler, pls set to false
|
||||
-- doc_lines = 2, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
|
||||
-- -- set to 0 if you DO NOT want any API comments be shown
|
||||
-- -- This setting only take effect in insert mode, it does not affect signature help in normal
|
||||
-- -- mode, 10 by default
|
||||
|
||||
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode
|
||||
fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters
|
||||
hint_enable = false, -- virtual hint enable
|
||||
hint_prefix = "🐼 ", -- Panda for parameter
|
||||
hint_scheme = "String",
|
||||
use_lspsaga = true, -- set to true if you want to use lspsaga popup
|
||||
hi_parameter = "Search", -- how your parameter will be highlight
|
||||
max_height = 12, -- max height of signature floating_window, if content is more than max_height, you can scroll down
|
||||
-- to view the hiding contents
|
||||
max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width
|
||||
handler_opts = {
|
||||
border = "single", -- double, single, shadow, none
|
||||
},
|
||||
extra_trigger_chars = {}, -- Array of extra characters that will trigger signature completion, e.g., {"(", ","}
|
||||
})
|
||||
-- floating_window = true, -- show hint in a floating window, set to false for virtual text only mode
|
||||
-- fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters
|
||||
-- hint_enable = false, -- virtual hint enable
|
||||
-- hint_prefix = "🐼 ", -- Panda for parameter
|
||||
-- hint_scheme = "String",
|
||||
-- use_lspsaga = true, -- set to true if you want to use lspsaga popup
|
||||
-- hi_parameter = "Search", -- how your parameter will be highlight
|
||||
-- max_height = 12, -- max height of signature floating_window, if content is more than max_height, you can scroll down
|
||||
-- -- to view the hiding contents
|
||||
-- max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width
|
||||
-- handler_opts = {
|
||||
-- border = "single", -- double, single, shadow, none
|
||||
-- },
|
||||
-- extra_trigger_chars = {}, -- Array of extra characters that will trigger signature completion, e.g., {"(", ","}
|
||||
-- })
|
||||
|
||||
local ts_utils = require("nvim-lsp-ts-utils")
|
||||
-- local ts_utils = require("nvim-lsp-ts-utils")
|
||||
|
||||
ts_utils.setup({
|
||||
debug = false,
|
||||
disable_commands = false,
|
||||
enable_import_on_completion = false,
|
||||
import_all_timeout = 5000, -- ms
|
||||
-- ts_utils.setup({
|
||||
-- debug = false,
|
||||
-- disable_commands = false,
|
||||
-- enable_import_on_completion = false,
|
||||
-- import_all_timeout = 5000, -- ms
|
||||
|
||||
-- eslint
|
||||
eslint_enable_code_actions = true,
|
||||
eslint_enable_disable_comments = true,
|
||||
eslint_bin = "eslint_d",
|
||||
eslint_config_fallback = nil,
|
||||
eslint_enable_diagnostics = true,
|
||||
-- -- eslint
|
||||
-- eslint_enable_code_actions = true,
|
||||
-- eslint_enable_disable_comments = true,
|
||||
-- eslint_bin = "eslint_d",
|
||||
-- eslint_config_fallback = nil,
|
||||
-- eslint_enable_diagnostics = true,
|
||||
|
||||
-- formatting
|
||||
enable_formatting = true,
|
||||
formatter = "prettier",
|
||||
formatter_config_fallback = nil,
|
||||
-- -- formatting
|
||||
-- enable_formatting = true,
|
||||
-- formatter = "prettier",
|
||||
-- formatter_config_fallback = nil,
|
||||
|
||||
-- parentheses completion
|
||||
complete_parens = false,
|
||||
signature_help_in_parens = false,
|
||||
-- -- parentheses completion
|
||||
-- complete_parens = false,
|
||||
-- signature_help_in_parens = false,
|
||||
|
||||
-- update imports on file move
|
||||
update_imports_on_move = true,
|
||||
require_confirmation_on_move = true,
|
||||
watch_dir = nil,
|
||||
})
|
||||
-- -- update imports on file move
|
||||
-- update_imports_on_move = true,
|
||||
-- require_confirmation_on_move = true,
|
||||
-- watch_dir = nil,
|
||||
-- })
|
||||
|
||||
ts_utils.setup_client(client)
|
||||
-- ts_utils.setup_client(client)
|
||||
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>co", ":TSLspOrganize<CR>", { silent = true })
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "qq", ":TSLspFixCurrent<CR>", { silent = true })
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>cR", ":TSLspRenameFile<CR>", { silent = true })
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>ci", ":TSLspImportAll<CR>", { silent = true })
|
||||
end,
|
||||
})
|
||||
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>co", ":TSLspOrganize<CR>", { silent = true })
|
||||
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "qq", ":TSLspFixCurrent<CR>", { silent = true })
|
||||
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>cR", ":TSLspRenameFile<CR>", { silent = true })
|
||||
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>ci", ":TSLspImportAll<CR>", { silent = true })
|
||||
-- end,
|
||||
-- })
|
||||
|
|
|
@ -57,9 +57,9 @@ vim.wo.signcolumn = "yes"
|
|||
vim.o.laststatus = 3
|
||||
vim.o.cmdheight = 1
|
||||
-- vim.o.statusline = "═"
|
||||
vim.o.fillchars = "stl: ,stlnc: "
|
||||
-- vim.o.title = true
|
||||
-- vim.o.titlestring = "%F%m %r %y"
|
||||
vim.o.fillchars = "stl: ,stlnc: "
|
||||
vim.wo.foldmethod = "expr"
|
||||
vim.wo.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.g.netrw_dirhistmax = 0
|
||||
|
|
|
@ -16,7 +16,7 @@ set-option -g mouse on
|
|||
set -g set-clipboard on
|
||||
bind-key ] paste-buffer -p
|
||||
|
||||
set -g update-environment "XAUTHORITY DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION"
|
||||
set -g update-environment "BUILDCOMMAND GOPACKAGESDRIVER XAUTHORITY DISPLAY WINDOWID SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION"
|
||||
set -g default-command zsh
|
||||
set -g history-limit 10000
|
||||
|
||||
|
|
5
.zshrc
5
.zshrc
|
@ -221,12 +221,9 @@ export ANSIBLE_NOCOWS=1
|
|||
## Docker
|
||||
export DOCKER_BUILDKIT=1
|
||||
|
||||
## AWS
|
||||
if [ -x /usr/bin/aws_zsh_completer.sh ]; then
|
||||
source /usr/bin/aws_zsh_completer.sh
|
||||
fi
|
||||
PROG=tea _CLI_ZSH_AUTOCOMPLETE_HACK=1 source "/home/dln/.config/tea/autocomplete.zsh"
|
||||
|
||||
## AWS
|
||||
autoload -U +X bashcompinit && bashcompinit
|
||||
complete -o nospace -C /usr/bin/mcli mcli
|
||||
complete -C '/usr/bin/aws_completer' aws
|
||||
|
|
Loading…
Add table
Reference in a new issue