ts extra tooling / messing with autocomplete (it was alacritty fault)
This commit is contained in:
parent
79c75bcf3d
commit
7b599595c4
12
init.lua
12
init.lua
|
@ -160,8 +160,10 @@ vim.opt.cursorline = true
|
||||||
-- Minimal number of screen lines to keep above and below the cursor.
|
-- Minimal number of screen lines to keep above and below the cursor.
|
||||||
vim.opt.scrolloff = 15
|
vim.opt.scrolloff = 15
|
||||||
|
|
||||||
-- Tabstop 8 by default, 4 looks better in my opinion
|
-- Tabstop in any other number that is not 8 makes documents look weird, will try with using other opts
|
||||||
vim.opt.tabstop = 4
|
vim.opt.tabstop = 8
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
|
||||||
-- [[ Basic Keymaps ]]
|
-- [[ Basic Keymaps ]]
|
||||||
-- See `:help vim.keymap.set()`
|
-- See `:help vim.keymap.set()`
|
||||||
|
@ -329,7 +331,7 @@ require('lazy').setup {
|
||||||
-- Useful for getting pretty icons, but requires special font.
|
-- Useful for getting pretty icons, but requires special font.
|
||||||
-- If you already have a Nerd Font, or terminal set up with fallback fonts
|
-- If you already have a Nerd Font, or terminal set up with fallback fonts
|
||||||
-- you can enable this
|
-- you can enable this
|
||||||
-- { 'nvim-tree/nvim-web-devicons' }
|
{ 'nvim-tree/nvim-web-devicons' },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
-- Telescope is a fuzzy finder that comes with a lot of different things that
|
||||||
|
@ -555,7 +557,7 @@ require('lazy').setup {
|
||||||
-- https://github.com/pmizio/typescript-tools.nvim
|
-- https://github.com/pmizio/typescript-tools.nvim
|
||||||
--
|
--
|
||||||
-- But for many setups, the LSP (`tsserver`) will work just fine
|
-- But for many setups, the LSP (`tsserver`) will work just fine
|
||||||
-- tsserver = {},
|
tsserver = {},
|
||||||
--
|
--
|
||||||
|
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
|
@ -795,7 +797,7 @@ require('lazy').setup {
|
||||||
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc' },
|
ensure_installed = { 'bash', 'c', 'html', 'lua', 'markdown', 'vim', 'vimdoc', 'javascript', 'typescript' },
|
||||||
-- Autoinstall languages that are not installed
|
-- Autoinstall languages that are not installed
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
|
|
|
@ -3,8 +3,63 @@
|
||||||
--
|
--
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {
|
return {
|
||||||
'morhetz/gruvbox',
|
{
|
||||||
config = function()
|
'morhetz/gruvbox',
|
||||||
vim.cmd.colorscheme 'gruvbox'
|
config = function()
|
||||||
end,
|
vim.cmd.colorscheme 'gruvbox'
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'pmizio/typescript-tools.nvim',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
|
||||||
|
opts = {},
|
||||||
|
config = function()
|
||||||
|
require('typescript-tools').setup {
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
-- spawn additional tsserver instance to calculate diagnostics on it
|
||||||
|
separate_diagnostic_server = true,
|
||||||
|
-- "change"|"insert_leave" determine when the client asks the server about diagnostic
|
||||||
|
publish_diagnostic_on = 'insert_leave',
|
||||||
|
-- array of strings("fix_all"|"add_missing_imports"|"remove_unused"|
|
||||||
|
-- "remove_unused_imports"|"organize_imports") -- or string "all"
|
||||||
|
-- to include all supported code actions
|
||||||
|
-- specify commands exposed as code_actions
|
||||||
|
expose_as_code_action = {},
|
||||||
|
-- string|nil - specify a custom path to `tsserver.js` file, if this is nil or file under path
|
||||||
|
-- not exists then standard path resolution strategy is applied
|
||||||
|
tsserver_path = nil,
|
||||||
|
-- specify a list of plugins to load by tsserver, e.g., for support `styled-components`
|
||||||
|
-- (see ?? `styled-components` support section)
|
||||||
|
tsserver_plugins = {},
|
||||||
|
-- this value is passed to: https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes
|
||||||
|
-- memory limit in megabytes or "auto"(basically no limit)
|
||||||
|
tsserver_max_memory = 'auto',
|
||||||
|
-- described below
|
||||||
|
tsserver_format_options = {},
|
||||||
|
tsserver_file_preferences = {},
|
||||||
|
-- locale of all tsserver messages, supported locales you can find here:
|
||||||
|
-- https://github.com/microsoft/TypeScript/blob/3c221fc086be52b19801f6e8d82596d04607ede6/src/compiler/utilitiesPublic.ts#L620
|
||||||
|
tsserver_locale = 'en',
|
||||||
|
-- mirror of VSCode's `typescript.suggest.completeFunctionCalls`
|
||||||
|
complete_function_calls = false,
|
||||||
|
include_completions_with_insert_text = true,
|
||||||
|
-- CodeLens
|
||||||
|
-- WARNING: Experimental feature also in VSCode, because it might hit performance of server.
|
||||||
|
-- possible values: ("off"|"all"|"implementations_only"|"references_only")
|
||||||
|
code_lens = 'off',
|
||||||
|
-- by default code lenses are displayed on all referencable values and for some of you it can
|
||||||
|
-- be too much this option reduce count of them by removing member references from lenses
|
||||||
|
disable_member_code_lens = true,
|
||||||
|
-- JSXCloseTag
|
||||||
|
-- WARNING: it is disabled by default (maybe you configuration or distro already uses nvim-ts-autotag,
|
||||||
|
-- that maybe have a conflict if enable this feature. )
|
||||||
|
jsx_close_tag = {
|
||||||
|
enable = false,
|
||||||
|
filetypes = { 'javascriptreact', 'typescriptreact' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue