Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace typscript-tools -> nvim-vtsls #13

Merged
merged 6 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions .config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,38 @@
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "8b5e13c1af3211f5bb5e091992aba8629312e514" },
"conform.nvim": { "branch": "master", "commit": "50649648851cd0e126dfedd0f3c33b900a6f1ef8" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
"emmet-vim": { "branch": "master", "commit": "6c511a8d7d2863066f32e25543e2bb99d505172c" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
"gitsigns.nvim": { "branch": "main", "commit": "899e993850084ea33d001ec229d237bc020c19ae" },
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
"hererocks": { "branch": "master", "commit": "8bd2fcfdd65cfa7535ce39ea372a63b0bdb8e528" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
"lua-language-server": { "branch": "master", "commit": "ba8f90eb0fab18ce8aee2bdbf7007dc63050381d" },
"lua-language-server": { "branch": "master", "commit": "44b632dc0b1969d0a503dc18419731249c6ad267" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"nvim-ansible": { "branch": "main", "commit": "7b1b994e4267b4c99045ef2798f7c12f326c2247" },
"nvim-autopairs": { "branch": "master", "commit": "19606af7c039271d5aa96bceff101e7523af3136" },
"nvim-ansible": { "branch": "main", "commit": "9c3b4a771b8c8d7b4f2171466464d978cb3846f7" },
"nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
"nvim-lspconfig": { "branch": "master", "commit": "6bfd9210e312af6cfedba05d272e85618c93ab0d" },
"nvim-lspconfig": { "branch": "master", "commit": "73e0002b6f211376bbf36c31a2f812aedf6bd6b0" },
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
"nvim-treesitter": { "branch": "master", "commit": "585860a1865853d2c287c8ef534297da8115818e" },
"nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
"oil.nvim": { "branch": "master", "commit": "4f3c6780ff272d8facab69a658cf8693582b7a54" },
"persisted.nvim": { "branch": "main", "commit": "b975b6762bb79efd76453d822a53547c37066aec" },
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
"rest.nvim": { "branch": "main", "commit": "1ce984c694345f3801bc656072f9a8dd51286a04" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "a46780830b576049c675680650f773bedfa8677a" },
"nvim-treesitter": { "branch": "master", "commit": "2b2ac302324f4cd2194c5dcaa59332b65e1c6403" },
"nvim-web-devicons": { "branch": "master", "commit": "9154484705968658e9aab2b894d1b2a64bf9f83d" },
"oil.nvim": { "branch": "master", "commit": "1eb9fb35a4613518f79790117ed82c367a0b4a22" },
"persisted.nvim": { "branch": "main", "commit": "0caa1b4837c1adfda755694b5386fe5ae13e405f" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"rest.nvim": { "branch": "main", "commit": "9f6f9dd928d612e52e756f0a0c057ee3cf16c39b" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "dd9de68c08b6d678198a99f5ea13e0384a1f04cf" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" },
"telescope.nvim": { "branch": "master", "commit": "b5fd7f7ae0ea4537511077ed8ef4a6021cedba2f" },
"typescript-tools.nvim": { "branch": "master", "commit": "f8c2e0b36b651c85f52ad5c5373ff8b07adc15a7" },
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
"vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" },
"vim-dadbod-ssh": { "branch": "master", "commit": "9bce775ee76c3dd6d7508dcd9eb276b36133d710" },
"vim-dadbod-ui": { "branch": "master", "commit": "2f344874918a3ab6bbe68fb866b3f003a639a5d2" },
"vim-fugitive": { "branch": "master", "commit": "0444df68cd1cdabc7453d6bd84099458327e5513" },
"vim-dadbod-ui": { "branch": "master", "commit": "a5ff8bd69fcaf53cd24827b54492c8ce87806d18" },
"vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" },
"vim-table-mode": { "branch": "master", "commit": "e4365bde024f73e205eefa2fb78e3029ddb92ea9" },
"which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" }
"which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" }
}
3 changes: 3 additions & 0 deletions .config/nvim/lua/config/lazy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ require("lazy").setup("plugins", {
enabled = true,
notify = false,
},
rocks = {
hererocks = true,
},
performance = {
cache = {
enabled = true,
Expand Down
7 changes: 7 additions & 0 deletions .config/nvim/lua/core/autocmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,10 @@ autocmd({ "FileType" }, {
pattern = { "markdown", "gitcommit", "mail" },
command = "setlocal spell spelllang=en,nl",
})

autocmd({ "FileType" }, {
pattern = { "json" },
callback = function()
vim.bo.formatprg = "jq"
end,
})
1 change: 1 addition & 0 deletions .config/nvim/lua/plugins/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ return {
{
"pmizio/typescript-tools.nvim",
ft = { "typescript", "typescriptreact", "javascript", "javascriptreact", "json" },
enabled = false,
opts = {
on_attach = function(client, bufnr)
keymaps.on_attach(client, bufnr)
Expand Down
19 changes: 19 additions & 0 deletions .config/nvim/lua/plugins/lsp/setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ local servers = {
},
},
terraformls = {},
vtsls = {
settings = {
vtsls = {
autoUseWorkspaceTsdk = true,
experimental = {
completion = {
enableServerSideFuzzyMatch = true,
entriesLimit = 1000,
},
},
},
typescript = {
updateImportsOnFileMove = "always",
tsserver = {
maxTsServerMemory = 8192,
},
},
},
},
}

return servers
15 changes: 8 additions & 7 deletions .config/nvim/lua/plugins/rest.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
return {
"rest-nvim/rest.nvim",
ft = { "http" },
version = "v1.2.1",
version = "*",
keys = {
{ "<leader>rr", "<Plug>RestNvim <CR>", desc = "Run HTTP Request under cursor" },
{ "<leader>rp", "<Plug>RestNvimPreview <CR>", desc = "Preview the request cURL command" },
{ "<leader>rl", "<Plug>RestNvimLast <CR>", desc = "Re-run last request" },
},
opts = {
result_split_in_place = true,
{ "<leader>rr", "<cmd>Rest run<CR>", desc = "Run HTTP Request under cursor" },
{ "<leader>ro", "<cmd>Rest open<CR>", desc = "Open rest" },
{ "<leader>rl", "<cmd>Rest logs<CR>", desc = "Rest logs" },
{ "<leader>ra", "<cmd>Rest last<CR>", desc = "Re-run last request" },
{ "<leader>re", "<cmd>Rest env show<CR>", desc = "Show rest env" },
{ "<leader>rs", "<cmd>Rest env select<CR>", desc = "Select rest env" },
},
opts = {},
}
21 changes: 9 additions & 12 deletions .config/nvim/lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@ local M = {
"nvim-telescope/telescope.nvim",
dependencies = {
{ "nvim-telescope/telescope-file-browser.nvim" },
{ "nvim-telescope/telescope-ui-select.nvim" },
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
{
"stevearc/dressing.nvim",
version = "*",
opts = {
select = {
telescope = require("telescope.themes").get_cursor(),
},
},
},
},
cmd = { "Telescope" },
keys = {
Expand Down Expand Up @@ -78,10 +86,6 @@ function M.config()
prompt_position = "top",
}

local dropdown_layout_config = {
prompt_position = "top",
}

require("telescope").setup({
defaults = {
vimgrep_arguments = {
Expand Down Expand Up @@ -148,11 +152,6 @@ function M.config()
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
},
["ui-select"] = {
require("telescope.themes").get_cursor({
layout_config = dropdown_layout_config,
}),
},
file_browser = {
theme = "ivy",
layout_config = {
Expand All @@ -176,8 +175,6 @@ function M.config()
},
})
-- To get fzf loaded and working with telescope, you need to call
-- load_extension, somewhere after setup function:
require("telescope").load_extension("ui-select")
require("telescope").load_extension("fzf")
require("telescope").load_extension("file_browser")
require("telescope").load_extension("persisted")
Expand Down