{"id":2705,"date":"2023-03-09T17:34:54","date_gmt":"2023-03-09T22:34:54","guid":{"rendered":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/?p=2705"},"modified":"2023-03-09T17:35:07","modified_gmt":"2023-03-09T22:35:07","slug":"vs-code-setup-and-extensions","status":"publish","type":"post","link":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/tools\/vs-code-setup-and-extensions\/","title":{"rendered":"VS Code Setup and Extensions"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Setup<\/h2>\n\n\n\n<p>When we&#8217;re working with Eleventy, we will use Markdown and Nunjucks files. Markdown files have their own syntax but you can also use normal HTLM. Nunjucks are template files and we will mostly be writing HTML with some of the Nunjucks template syntax as well. However VS Code will not recognize these as HTML files either. <\/p>\n\n\n\n<p>To be able to use Emmet with both we will change the settings.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Type Shift+Command+P (macOS) or Shift+Ctrl+P (Windows) to bring up the <strong>Command Palette<\/strong><\/li>\n\n\n\n<li>Type in <strong>User Settings<\/strong> in the prompt that appears.<\/li>\n\n\n\n<li>Select <strong>Preferences: Open User Settings<\/strong>\n<ul class=\"wp-block-list\">\n<li>don&#8217;t select the one with (json) at the end<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>In <em>Search Settings<\/em> box type in <strong>files.associations<\/strong><\/li>\n\n\n\n<li>YOu should see an area titled Files: Associations<\/li>\n\n\n\n<li>Click the <strong>Add Item <\/strong>button<\/li>\n\n\n\n<li>There is space to put in a item and a value. Type in the following (note that the * asterisk in front of the item is important\n<ul class=\"wp-block-list\">\n<li>item: <strong>*.njk<\/strong>    value: <strong>html<\/strong>  then click OK<\/li>\n\n\n\n<li>item: <strong>*.md<\/strong> value: <strong>html<\/strong>  then click OK<\/li>\n\n\n\n<li><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"91\" class=\"wp-image-2706\" style=\"width: 400px;\" src=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.28.16-PM.png\" alt=\"\" srcset=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.28.16-PM.png 1314w, https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.28.16-PM-300x68.png 300w, https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.28.16-PM-1024x232.png 1024w, https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.28.16-PM-768x174.png 768w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>This will now have VS Code see all Nunjucks (.njk) and all Markdown (.md) files as HTML and allow you to use Emmet.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"396\" src=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.22.51-PM-1024x396.png\" alt=\"\" class=\"wp-image-2707\" srcset=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.22.51-PM-1024x396.png 1024w, https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.22.51-PM-300x116.png 300w, https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.22.51-PM-768x297.png 768w, https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.22.51-PM-1536x594.png 1536w, https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.22.51-PM-1568x607.png 1568w, https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-content\/uploads\/sites\/2916\/2023\/03\/Screenshot-2023-03-09-at-5.22.51-PM.png 1912w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Files: Associations settings after associating nunjucks and Markdown files with HTML.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Extensions<\/h2>\n\n\n\n<p>Extensions add abilities to VS Code. On order to make our work with VS Code Easier I recommend the following extensions:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>GitLens<\/li>\n\n\n\n<li>Nunjucks<\/li>\n\n\n\n<li>Live Server (only on the first project. We do not need this when working with Eleventy)<\/li>\n\n\n\n<li>Prettier<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Setup When we&#8217;re working with Eleventy, we will use Markdown and Nunjucks files. Markdown files have their own syntax but you can also use normal HTLM. Nunjucks are template files and we will mostly be writing HTML with some of the Nunjucks template syntax as well. However VS Code will not recognize these as HTML&hellip; <a class=\"more-link\" href=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/tools\/vs-code-setup-and-extensions\/\">Continue reading <span class=\"screen-reader-text\">VS Code Setup and Extensions<\/span><\/a><\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","portfolio_post_id":0,"portfolio_citation":"","portfolio_annotation":"","openlab_post_visibility":"","footnotes":""},"categories":[136],"tags":[54,218,219,135],"coauthors":[87],"class_list":["post-2705","post","type-post","status-publish","format-standard","hentry","category-tools","tag-eleventy","tag-markdown","tag-settings","tag-vs-code","entry"],"featured_image_urls_v2":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":"","post-thumbnail":"","gform-image-choice-sm":"","gform-image-choice-md":"","gform-image-choice-lg":""},"post_excerpt_stackable_v2":"<p>Setup When we&#8217;re working with Eleventy, we will use Markdown and Nunjucks files. Markdown files have their own syntax but you can also use normal HTLM. Nunjucks are template files and we will mostly be writing HTML with some of the Nunjucks template syntax as well. However VS Code will not recognize these as HTML files either. To be able to use Emmet with both we will change the settings. Type Shift+Command+P (macOS) or Shift+Ctrl+P (Windows) to bring up the Command Palette Type in User Settings in the prompt that appears. Select Preferences: Open User Settings don&#8217;t select the one&hellip;<\/p>\n","category_list_v2":"<a href=\"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/category\/tools\/\" rel=\"category tag\">Tools<\/a>","author_info_v2":{"name":"Christopher Stein","url":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/author\/cstein\/"},"comments_num_v2":"1 comment","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false,"gform-image-choice-sm":false,"gform-image-choice-md":false,"gform-image-choice-lg":false},"uagb_author_info":{"display_name":"Christopher Stein","author_link":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/author\/cstein\/"},"uagb_comment_info":1,"uagb_excerpt":"Setup When we&#8217;re working with Eleventy, we will use Markdown and Nunjucks files. Markdown files have their own syntax but you can also use normal HTLM. Nunjucks are template files and we will mostly be writing HTML with some of the Nunjucks template syntax as well. However VS Code will not recognize these as HTML&hellip;&hellip;","_links":{"self":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/posts\/2705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/comments?post=2705"}],"version-history":[{"count":2,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/posts\/2705\/revisions"}],"predecessor-version":[{"id":2709,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/posts\/2705\/revisions\/2709"}],"wp:attachment":[{"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/media?parent=2705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/categories?post=2705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/tags?post=2705"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/openlab.bmcc.cuny.edu\/mmp-350-spring23\/wp-json\/wp\/v2\/coauthors?post=2705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}